diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index b6489a206bc..8a8349bb26b 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -208,7 +208,7 @@ if ($action == 'update') { } if ($mode == 'dashboard') { - + dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity); } if ($mode == 'other') { @@ -226,8 +226,6 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity); - - dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity); } if ($mode == 'login') { @@ -337,75 +335,105 @@ if ($mode == 'dashboard') { print '
| '; - print $langs->trans("DashboardEnableBlockToShow"); - print ' | |
|---|---|
| ' . $langs->trans('MAIN_DISABLE_METEO') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0); + print ' |
| ';
+ $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . ' '; + foreach ($substitutionarray as $key => $val) { + $texthelp .= $key . ' '; + } + print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday'); + + print ' | '; + + $doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); + $doleditor->Create(); + + print ' |
| ' . $langs->trans('DashboardDisableGlobal') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0); print ' | '; print '
| ' . $langs->trans('DashboardDisableBlockAgenda') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0); + print ' |
| ' . $langs->trans('BoxstatsDisableGlobal') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_GLOBAL_BOXSTATS", array(), $conf->entity, 0, 0, 1, 0); print ' | '; print '
| ' . $langs->trans('DashboardDisableBlockProject') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| '; + print $langs->trans("DashboardDisableBlocks"); + print ' | |
| ' . $langs->trans('DashboardDisableBlockCustomer') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| ' . $langs->trans('MAIN_DISABLE_METEO') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockSupplier') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| ' . $langs->trans('DashboardDisableBlockAgenda') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockContract') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| ' . $langs->trans('DashboardDisableBlockProject') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockTicket') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| ' . $langs->trans('DashboardDisableBlockCustomer') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockBank') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| ' . $langs->trans('DashboardDisableBlockSupplier') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockAdherent') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| ' . $langs->trans('DashboardDisableBlockContract') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockExpenseReport') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| ' . $langs->trans('DashboardDisableBlockTicket') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockHoliday') . ' | '; - print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| ' . $langs->trans('DashboardDisableBlockBank') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockAdherent') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockExpenseReport') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '
| ' . $langs->trans('DashboardDisableBlockHoliday') . ' | '; + print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0); + print ' | '; + print '