diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 5605fa4fb63..fcf3116a971 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -101,9 +101,14 @@ if ($action == 'update') { if ($mode == 'template') { dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity); - /*$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE'); - if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity); - else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/ + if (GETPOSTISSET('THEME_TOPMENU_DISABLE_IMAGE')) { + $val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE'); + if (!$val) { + dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity); + } + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array())))); if ($val == '') { diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 0589ca6c1c5..3883ae11fb4 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -450,26 +450,6 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; } - // Show logo - if ($foruserprofile) { - // Nothing - } else { - // Show logo - print ''.$langs->trans("EnableShowLogo").''; - if ($edit) { - print ajax_constantonoff('MAIN_SHOW_LOGO', array(), null, 0, 0, 1); - //print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1); - } else { - print yn($conf->global->MAIN_SHOW_LOGO); - } - print ''; - print ''; - /* - print ''.$langs->trans("EnableShowLogo").'' . yn($conf->global->MAIN_SHOW_LOGO) . ''; - print "";*/ - } - - // TopMenuDisableImages if ($foruserprofile) { /* @@ -493,26 +473,51 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) print '
('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print '';*/ } else { - $default = $langs->trans('No'); + $listoftopmenumodes = array( + '0' => $langs->transnoentitiesnoconv("IconAndText"), + '1' => $langs->transnoentitiesnoconv("TextOnly"), + '2' => $langs->transnoentitiesnoconv("IconOnlyAllTextsOnHover"), + '3' => $langs->transnoentitiesnoconv("IconOnlyTextOnHover"), + '4' => $langs->transnoentitiesnoconv("IconOnly"), + ); print ''; print ''.$langs->trans("TopMenuDisableImages").''; print ''; if ($edit) { - print ajax_constantonoff('THEME_TOPMENU_DISABLE_IMAGE', array(), null, 0, 0, 1); - //print $form->selectyesno('THEME_TOPMENU_DISABLE_IMAGE', $conf->global->THEME_TOPMENU_DISABLE_IMAGE, 1); + //print ajax_constantonoff('THEME_TOPMENU_DISABLE_IMAGE', array(), null, 0, 0, 1); + print $form->selectarray('THEME_TOPMENU_DISABLE_IMAGE', $listoftopmenumodes, $conf->global->THEME_TOPMENU_DISABLE_IMAGE); } else { - print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE); + $listoftopmenumodes[$conf->global->THEME_TOPMENU_DISABLE_IMAGE]; + //print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE); } - print '   '.$langs->trans("Default").': '.$default.' '; - print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); + print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes")); print ''; print ''; } + // Show logo + if ($foruserprofile) { + // Nothing + } else { + // Show logo + print ''.$langs->trans("EnableShowLogo").''; + if ($edit) { + print ajax_constantonoff('MAIN_SHOW_LOGO', array(), null, 0, 0, 1); + //print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1); + } else { + print yn($conf->global->MAIN_SHOW_LOGO); + } + print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes")); + print ''; + print ''; + /* + print ''.$langs->trans("EnableShowLogo").'' . yn($conf->global->MAIN_SHOW_LOGO) . ''; + print "";*/ + } + // BorderTableActive if ($foruserprofile) { } else { - $default = $langs->trans('No'); print ''; print ''.$langs->trans("UseBorderOnTable").''; print ''; @@ -522,8 +527,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } else { print yn($conf->global->THEME_ELDY_USEBORDERONTABLE); } - print '   '.$langs->trans("Default").': '.$default.' '; - print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); + print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes")); print ''; print ''; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d122e9ca7d1..c7814211344 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2254,4 +2254,9 @@ ReadOnlyMode=Is instance in "Read Only" mode DEBUGBAR_USE_LOG_FILE=Use the dolibarr.log file to trap Logs UsingLogFileShowAllRecordOfSubrequestButIsSlower=Use the dolibarr.log file to trap Logs instead of live memory catching. It allows to catch all logs instead of only log of current process (so including the one of ajax subrequests pages) but will make your instance very very slow. Not recommended. FixedOrPercent=Fixed (use keyword 'fixed') or percent (use keyword 'percent') -DefaultOpportunityStatus=Default opportunity status (first status when lead is created) \ No newline at end of file +DefaultOpportunityStatus=Default opportunity status (first status when lead is created) +IconAndText=Icon and text +TextOnly=Text only +IconOnlyAllTextsOnHover=Icon only - All texts appears under icon on mouse hover menu bar +IconOnlyTextOnHover=Icon only - Text of icon appears under icon on mouse hover the icon +IconOnly=Icon only - Text on tooltip only