This commit is contained in:
Laurent Destailleur 2020-09-03 21:23:58 +02:00
parent 614c188486
commit 1408c862f6

View File

@ -467,7 +467,7 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
$s .= "\n".'<!-- Div to calendars selectors -->'."\n";
$s .= '<script type="text/javascript">'."\n";
$s .= 'jQuery(document).ready(function () {'."\n";
$s .= 'jQuery("#check_birthday").click(function() { console.log("Toggle birthday"); jQuery(".family_birthday").toggle(); });'."\n";
$s .= 'jQuery(".check_birthday").click(function() { console.log("Toggle birthday"); jQuery(".family_birthday").toggle(); });'."\n";
$s .= 'jQuery(".family_birthday").toggle();'."\n";
if ($action == "show_week" || $action == "show_month" || empty($action))
{
@ -510,7 +510,7 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
}
// Birthdays
$s .= '<div class="nowrap inline-block"><input type="checkbox" id="check_birthday" name="check_birthday"> '.$langs->trans("AgendaShowBirthdayEvents").' &nbsp; </div>';
$s .= '<div class="nowrap inline-block"><input type="checkbox" id="check_birthday" name="check_birthday" class="check_birthday"> <span class="check_birthday_text">'.$langs->trans("AgendaShowBirthdayEvents").'</span> &nbsp; </div>';
// Calendars from hooks
$parameters = array(); $object = null;