|
@@ -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 '</table><br>';
|
|
|
+
|
|
|
+ print load_fiche_titre($langs->trans('MiscellaneousOptions'), '', '');
|
|
|
}
|
|
|
|
|
|
+
|
|
|
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
|
|
print '<input type="hidden" name="action" value="set">';
|
|
@@ -431,56 +405,6 @@ print $form->buttonsSaveCancel("Save", '');
|
|
|
print '</form>';
|
|
|
|
|
|
|
|
|
-/*
|
|
|
- * 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 '<form action="'.$_SERVER["PHP_SELF"].'" name="form_colors">';
|
|
|
-print '<input type="hidden" name="token" value="'.newToken().'">';
|
|
|
-print '<input type="hidden" name="action" value="setcolors">';
|
|
|
-
|
|
|
-print '<table class="noborder allwidth">'."\n";
|
|
|
-print '<tr class="liste_titre">'."\n";
|
|
|
-print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
|
|
-print '<td class="center"> </td>'."\n";
|
|
|
-print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
|
|
|
-print '</tr>'."\n";
|
|
|
-
|
|
|
-// AGENDA_EVENT_PAST_COLOR
|
|
|
-print '<tr class="oddeven">'."\n";
|
|
|
-print '<td>'.$langs->trans('AGENDA_EVENT_PAST_COLOR').'</td>'."\n";
|
|
|
-print '<td class="center"> </td>'."\n";
|
|
|
-print '<td class="right">'."\n";
|
|
|
-print $formother->selectColor($conf->global->AGENDA_EVENT_PAST_COLOR, 'event_past_color');
|
|
|
-print '</td></tr>'."\n";
|
|
|
-// AGENDA_EVENT_CURRENT_COLOR
|
|
|
-print '<tr class="oddeven">'."\n";
|
|
|
-print '<td>'.$langs->trans('AGENDA_EVENT_CURRENT_COLOR').'</td>'."\n";
|
|
|
-print '<td class="center"> </td>'."\n";
|
|
|
-print '<td class="right">'."\n";
|
|
|
-print $formother->selectColor($conf->global->AGENDA_EVENT_CURRENT_COLOR, 'event_current_color');
|
|
|
-print '</td></tr>'."\n";
|
|
|
-// AGENDA_EVENT_FUTURE_COLOR
|
|
|
-print '<tr class="oddeven">'."\n";
|
|
|
-print '<td>'.$langs->trans('AGENDA_EVENT_FUTURE_COLOR').'</td>'."\n";
|
|
|
-print '<td class="center"> </td>'."\n";
|
|
|
-print '<td class="right">'."\n";
|
|
|
-print $formother->selectColor($conf->global->AGENDA_EVENT_FUTURE_COLOR, 'event_future_color');
|
|
|
-print '</td></tr>'."\n";
|
|
|
-
|
|
|
-print '</table>';
|
|
|
-
|
|
|
-print $form->buttonsSaveCancel("Save", '');
|
|
|
-
|
|
|
-print '</form>';
|
|
|
-
|
|
|
-print "<br>";
|
|
|
-
|
|
|
print dol_get_fiche_end();
|
|
|
|
|
|
// End of page
|