diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 8916433707d..aef46db26ef 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -113,33 +113,6 @@ if ($action == 'set') { } else { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } -} elseif ($action == 'setcolors') { - $event_color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('event_past_color', 'alphanohtml')); - $res = dolibarr_set_const($db, 'AGENDA_EVENT_PAST_COLOR', $event_color, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { - $error++; - $errors[] = $db->lasterror(); - } - - $event_color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('event_current_color', 'alphanohtml')); - $res = dolibarr_set_const($db, 'AGENDA_EVENT_CURRENT_COLOR', $event_color, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { - $error++; - $errors[] = $db->lasterror(); - } - - $event_color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('event_future_color', 'alphanohtml')); - $res = dolibarr_set_const($db, 'AGENDA_EVENT_FUTURE_COLOR', $event_color, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { - $error++; - $errors[] = $db->lasterror(); - } - - if ($error) { - setEventMessages('', $errors, 'errors'); - } else { - setEventMessage($langs->trans('SetupSaved')); - } } elseif ($action == 'specimen') { // For orders $modele = GETPOST('module', 'alpha'); @@ -226,8 +199,6 @@ print dol_get_fiche_head($head, 'other', $langs->trans("Agenda"), -1, 'action'); * Miscellaneous */ -print load_fiche_titre($langs->trans('Miscellaneous'), '', ''); - // Define array def of models $def = array(); @@ -339,8 +310,11 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { } } print '
'; + + print load_fiche_titre($langs->trans('MiscellaneousOptions'), '', ''); } + print '
'; print ''; print ''; @@ -431,56 +405,6 @@ print $form->buttonsSaveCancel("Save", ''); print '
'; -/* - * User interface (colors) - */ - -print load_fiche_titre($langs->trans('UserInterface'), '', ''); - -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; -$formother = new FormOther($db); - -print '
'; -print ''; -print ''; - -print ''."\n"; -print ''."\n"; -print ''."\n"; -print ''."\n"; -print ''."\n"; -print ''."\n"; - -// AGENDA_EVENT_PAST_COLOR -print ''."\n"; -print ''."\n"; -print ''."\n"; -print ''."\n"; -// AGENDA_EVENT_CURRENT_COLOR -print ''."\n"; -print ''."\n"; -print ''."\n"; -print ''."\n"; -// AGENDA_EVENT_FUTURE_COLOR -print ''."\n"; -print ''."\n"; -print ''."\n"; -print ''."\n"; - -print '
'.$langs->trans("Parameters").' '.$langs->trans("Value").'
'.$langs->trans('AGENDA_EVENT_PAST_COLOR').' '."\n"; -print $formother->selectColor($conf->global->AGENDA_EVENT_PAST_COLOR, 'event_past_color'); -print '
'.$langs->trans('AGENDA_EVENT_CURRENT_COLOR').' '."\n"; -print $formother->selectColor($conf->global->AGENDA_EVENT_CURRENT_COLOR, 'event_current_color'); -print '
'.$langs->trans('AGENDA_EVENT_FUTURE_COLOR').' '."\n"; -print $formother->selectColor($conf->global->AGENDA_EVENT_FUTURE_COLOR, 'event_future_color'); -print '
'; - -print $form->buttonsSaveCancel("Save", ''); - -print '
'; - -print "
"; - print dol_get_fiche_end(); // End of page diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 76c717b669d..42967b4f275 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -150,7 +150,6 @@ $linkback = 'trans("Agenda"), -1, 'action'); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 5b51d48392b..3460355a803 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -299,6 +299,7 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) { $enabled = 'AGENDA_EXT_ENABLED_'.$user->id.'_'.$i; $default = 'AGENDA_EXT_ACTIVEBYDEFAULT_'.$user->id.'_'.$i; $buggedfile = 'AGENDA_EXT_BUGGEDFILE_'.$user->id.'_'.$i; + if (getDolUserString($source) && getDolUserString($name)) { // Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight' $listofextcals[] = array( diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index dd137690e47..5abd2d3f101 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -951,14 +951,15 @@ while ($i < $imaxinloop) { $event_owner_style .= 'border-left: #' . $cache_user_list[$obj->fk_user_action]->color . ' 5px solid;'; } - // get event style for start date + // get event style for start and end date $event_more_class = ''; - $event_start_date_style = ''; + $event_start_date_css = ''; + $event_end_date_css = ''; $event_start_date_time = $actionstatic->datep; if ($event_start_date_time > $now) { // future event $event_more_class = 'event-future'; - $event_start_date_color = $conf->global->AGENDA_EVENT_FUTURE_COLOR; + $event_start_date_css = $event_end_date_css = $event_more_class; } else { if ($obj->fulldayevent == 1) { $today_start_date_time = $today_start_time; @@ -971,20 +972,16 @@ while ($i < $imaxinloop) { if ($event_end_date_time != null && $event_end_date_time < $today_start_date_time) { // past event $event_more_class = 'event-past'; - $event_start_date_color = $conf->global->AGENDA_EVENT_PAST_COLOR; } elseif ($event_end_date_time == null && $event_start_date_time < $today_start_date_time) { // past event $event_more_class = 'event-past'; - $event_start_date_color = $conf->global->AGENDA_EVENT_PAST_COLOR; } else { // current event $event_more_class = 'event-current'; - $event_start_date_color = $conf->global->AGENDA_EVENT_CURRENT_COLOR; } + $event_start_date_css = $event_end_date_css = $event_more_class; } - if ($event_start_date_color != '') { - $event_start_date_style .= 'background: #' . $event_start_date_color . ';'; - } + $event_start_date_css = $event_end_date_css = $event_more_class; print ''; // Action column @@ -1065,13 +1062,14 @@ while ($i < $imaxinloop) { // Start date if (!empty($arrayfields['a.datep']['checked'])) { - print ''; + print ''; if (empty($obj->fulldayevent)) { print dol_print_date($db->jdate($obj->dp), $formatToUse, 'tzuserrel'); } else { $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); print dol_print_date($db->jdate($obj->dp), $formatToUse, ($tzforfullday ? $tzforfullday : 'tzuserrel')); } + print ''; $late = 0; if ($actionstatic->hasDelay() && $actionstatic->percentage >= 0 && $actionstatic->percentage < 100 ) { $late = 1; @@ -1084,13 +1082,14 @@ while ($i < $imaxinloop) { // End date if (!empty($arrayfields['a.datep2']['checked'])) { - print ''; + print ''; if (empty($obj->fulldayevent)) { print dol_print_date($db->jdate($obj->dp2), $formatToUse, 'tzuserrel'); } else { $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); print dol_print_date($db->jdate($obj->dp2), $formatToUse, ($tzforfullday ? $tzforfullday : 'tzuserrel')); } + print ''; print ''; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8920445508a..ab96f650b6f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -116,7 +116,7 @@ function getDolUserString($key, $default = '', $tmpuser = null) } // return $conf->global->$key ?? $default; - return (string) (empty($tmpuser->conf->$key) ? $default : $$tmpuser->conf->$key); + return (string) (empty($tmpuser->conf->$key) ? $default : $tmpuser->conf->$key); } /** diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 6cc135e3b2c..db11289d299 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1272,6 +1272,7 @@ TriggerActiveAsModuleActive=Triggers in this file are active as module %s GeneratedPasswordDesc=Choose the method to be used for auto-generated passwords. DictionaryDesc=Insert all reference data. You can add your values to the default. ConstDesc=This page allows you to edit (override) parameters not available in other pages. These are mostly reserved parameters for developers/advanced troubleshooting only. +MiscellaneousOptions=Miscellaneous options MiscellaneousDesc=All other security related parameters are defined here. LimitsSetup=Limits/Precision setup LimitsDesc=You can define limits, precisions and optimizations used by Dolibarr here diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index b9e35e1e9ea..0ba59834d71 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -5428,6 +5428,10 @@ td.cal_other_month { opacity: 0.8; } +td.event-past span { + opacity: 0.5; +} + /* ============================================================================== */