';
-$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").' ';
-foreach ($substitutionarray as $key => $val) {
- $texthelp .= $key.' ';
+if ($mode == 'template') {
+ // Themes and themes options
+ showSkins(null, 1);
}
-print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin');
-print ' | ';
-$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
-$doleditor->Create();
-print ' |
'."\n";
-// Background
-print ' | ';
-print '';
-$disabled = '';
-if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
- $disabled = ' disabled="disabled"';
-}
-print ' ';
-if ($disabled) {
- print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') ';
-}
-if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
- print ' '.img_delete($langs->trans("Delete")).'';
- if (file_exists($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) {
- print ' ';
- print ' .') ';
+if ($mode == 'other') {
+ // Other
+ print ' ';
+ print ' ';
+
+ // Disable javascript and ajax
+ print '| ' . $langs->trans("DisableJavascript") . ' | ';
+ print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0);
+ print ' ' . $langs->trans("DisableJavascriptNote") . '';
+ print ' | ';
+ print '';
+ print ' | ';
+ print ' ';
+
+ // Max size of lists
+ print '| ' . $langs->trans("DefaultMaxSizeList") . ' | | ';
+ print ' | ';
+ print ' ';
+
+ // Max size of short lists on customer card
+ print '| ' . $langs->trans("DefaultMaxSizeShortList") . ' | | ';
+ print ' | ';
+ print ' ';
+
+ // show input border
+ /*
+ print '| '.$langs->trans("showInputBorder").' | ';
+ print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1);
+ print ' | ';
+ print ' | ';
+ print ' ';
+ */
+
+ // First day for weeks
+ print '| ' . $langs->trans("WeekStartOnDay") . ' | ';
+ print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0);
+ print ' | ';
+ print ' | ';
+ print ' ';
+
+ // DefaultWorkingDays
+ print '| ' . $langs->trans("DefaultWorkingDays") . ' | ';
+ print '';
+ print ' | ';
+ print ' | ';
+ print ' ';
+
+ // DefaultWorkingHours
+ print '| ' . $langs->trans("DefaultWorkingHours") . ' | ';
+ print '';
+ print ' | ';
+ print ' | ';
+ print ' ';
+
+ // Firstname/Name
+ print '| ' . $langs->trans("FirstnameNamePosition") . ' | ';
+ $array = array(0 => $langs->trans("Firstname") . ' ' . $langs->trans("Lastname"), 1 => $langs->trans("Lastname") . ' ' . $langs->trans("Firstname"));
+ print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0));
+ print ' | ';
+ print ' | ';
+ print ' ';
+
+ // Hide unauthorized menus
+ print '| ' . $langs->trans("HideUnauthorizedMenu") . ' | ';
+ //print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1);
+ print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
+ print ' | ';
+ print ' | ';
+ print ' ';
+
+ // Hide unauthorized button
+ print '| ' . $langs->trans("ButtonHideUnauthorized") . ' | ';
+ //print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1);
+ print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
+ print ' | ';
+ print ' | ';
+ print ' ';
+
+ // Hide version link
+ /*
+
+ print '| '.$langs->trans("HideVersionLink").' | ';
+ print $form->selectyesno('MAIN_HIDE_VERSION',$conf->global->MAIN_HIDE_VERSION,1);
+ print ' | ';
+ print ' | ';
+ print ' ';
+ */
+
+ // Show bugtrack link
+ print '| ' . $langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")) . ' | ';
+ print '';
+ print ' | ';
+ print ' | ';
+ print ' ';
+
+ // Hide wiki link on login page
+ $pictohelp = '';
+ print '| ' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . ' | ';
+ print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0);
+ //print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1);
+ print ' | ';
+ print ' | ';
+ print ' ';
+
+ // Message of the day on home page
+ $substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
+ complete_substitutions_array($substitutionarray, $langs);
+
+ print '';
+ $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . ' ';
+ foreach ($substitutionarray as $key => $val) {
+ $texthelp .= $key . ' ';
}
-} else {
- print ' ';
-}
-print '';
-print ' | ';
+ print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
-print ' '."\n";
-print ' ';
+ 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 ' |
' . "\n";
+
+ print '