diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 05fe8c42081..3dcfb66031d 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -44,7 +44,7 @@ if (!$user->admin) { $action = GETPOST('action', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search -$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'language'; // 'language', 'template', 'dashboard', 'login', 'other' +$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'other'; // 'template', 'dashboard', 'login', 'other' if (!defined("MAIN_MOTD")) { define("MAIN_MOTD", ""); @@ -97,12 +97,6 @@ if ($action == 'removebackgroundlogin' && !empty($conf->global->MAIN_LOGIN_BACKG if ($action == 'update') { $error = 0; - if ($mode == 'language') { - dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity); - //dolibarr_set_const($db, "MAIN_MULTILANGS", GETPOST("MAIN_MULTILANGS"), 'chaine', 0, '', $conf->entity); - } - if ($mode == 'template') { dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity); @@ -212,6 +206,9 @@ if ($action == 'update') { } if ($mode == 'other') { + dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity); @@ -304,28 +301,6 @@ print dol_get_fiche_head($head, $mode, '', -1, ''); clearstatcache(); -if ($mode == 'language') { - print '
| '.$langs->trans("DefaultLanguage").' | '; - print img_picto('', 'language', 'class="pictofixedwidth"'); - print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2); - //print ''; - print ' | '; - print '
| ' . $langs->trans("EnableMultilangInterface") . ' | '; - print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0); - print ' | '; - print '
| '; + print $langs->trans("Language"); + print ' | '; + print ' |
| '.$langs->trans("DefaultLanguage").' | '; + print img_picto('', 'language', 'class="pictofixedwidth"'); + print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2); + //print ''; + print ' | '; + print '
| ' . $langs->trans("EnableMultilangInterface") . ' | '; + print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'language'); + print ' | '; + 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 '
| '; + print $langs->trans("Miscelaneous"); + print ' | '; + print ' | |
| ' . $langs->trans("DefaultMaxSizeList") . ' | '; @@ -515,7 +518,7 @@ if ($mode == 'other') { // 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 ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); print ' | '; print ''; 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 ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); print ' | '; print ''; print ' |
| ' . $langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")) . ' | '; + print ' | |
| '; + print $form->textwithpicto($langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")), $langs->trans("ShowBugTrackLinkDesc")); + print ' | '; print ''; print ' | '; print ''; @@ -548,12 +553,21 @@ if ($mode == 'other') { // 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 ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); //print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1); print ' | '; print ''; print ' |
| ' . $langs->trans("DisableJavascript") . ' | '; + print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other'); + print ' ' . $langs->trans("DisableJavascriptNote") . ''; + print ' | '; + print ''; + print ' | '; + print '
| '; + print $langs->trans("Parameter"); + print ' | '; + print $langs->trans("Value"); + print ' | |
| ' . $langs->trans("DisableLinkToHelpCenter") . ' | '; - print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0); + print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '', 'login'); print ' | '; - print ''; print ' | '; + 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 ' | ||
| ';
print ' ';
$disabled = '';
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php
index 6285aabfb05..c97d80dda4d 100644
--- a/htdocs/core/lib/admin.lib.php
+++ b/htdocs/core/lib/admin.lib.php
@@ -675,13 +675,13 @@ function ihm_prepare_head()
$h = 0;
$head = array();
- $head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=language";
- $head[$h][1] = $langs->trans("DefaultLanguage");
- $head[$h][2] = 'language';
+ $head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=other";
+ $head[$h][1] = $langs->trans("LanguageAndPresentation");
+ $head[$h][2] = 'other';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=template";
- $head[$h][1] = $langs->trans("DefaultSkin");
+ $head[$h][1] = $langs->trans("SkinAndColors");
$head[$h][2] = 'template';
$h++;
@@ -695,11 +695,6 @@ function ihm_prepare_head()
$head[$h][2] = 'login';
$h++;
- $head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=other";
- $head[$h][1] = $langs->trans("Miscellaneous");
- $head[$h][2] = 'other';
- $h++;
-
complete_head_from_modules($conf, $langs, null, $head, $h, 'ihm_admin');
complete_head_from_modules($conf, $langs, null, $head, $h, 'ihm_admin', 'remove');
diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php
index ac0c24bd05b..cf0752738a5 100644
--- a/htdocs/core/lib/ajax.lib.php
+++ b/htdocs/core/lib/ajax.lib.php
@@ -547,9 +547,10 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete =
* @param int $forcenoajax 1 = Force to use a ahref link instead of ajax code.
* @param int $setzeroinsteadofdel 1 = Set constantto '0' instead of deleting it
* @param string $suffix Suffix to use on the name of the switch_on picto. Example: '', '_red'
+ * @param string $mode Add parameter &mode= to the href link (Used for href link)
* @return string
*/
-function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0, $marginleftonlyshort = 2, $forcenoajax = 0, $setzeroinsteadofdel = 0, $suffix = '')
+function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0, $marginleftonlyshort = 2, $forcenoajax = 0, $setzeroinsteadofdel = 0, $suffix = '', $mode = '')
{
global $conf, $langs, $user;
@@ -560,9 +561,9 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
if (empty($conf->use_javascript_ajax) || $forcenoajax) {
if (empty($conf->global->$code)) {
- print ''.img_picto($langs->trans("Disabled"), 'off').'';
+ print ''.img_picto($langs->trans("Disabled"), 'off').'';
} else {
- print ''.img_picto($langs->trans("Enabled"), 'on').'';
+ print ''.img_picto($langs->trans("Enabled"), 'on').'';
}
} else {
$out = "\n".'
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 998c6c7aff0..7df422d9b9b 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -375,8 +375,8 @@ UMask=UMask parameter for new files on Unix/Linux/BSD/Mac file system.
UMaskExplanation=This parameter allow you to define permissions set by default on files created by Dolibarr on server (during upload for example). It must be the octal value (for example, 0666 means read and write for everyone). This parameter is useless on a Windows server. SeeWikiForAllTeam=Take a look at the Wiki page for a list of contributors and their organization UseACacheDelay= Delay for caching export response in seconds (0 or empty for no cache) -DisableLinkToHelpCenter=Hide link "Need help or support" on login page -DisableLinkToHelp=Hide link to online help "%s" +DisableLinkToHelpCenter=Hide the link "Need help or support" on the login page +DisableLinkToHelp=Hide the link to the online help "%s" AddCRIfTooLong=There is no automatic text wrapping, text that is too long will not display on documents. Please add carriage returns in the text area if needed. ConfirmPurge=Are you sure you want to execute this purge? This will permanently delete all your data files with no way to restore them (ECM files, attached files...). MinLength=Minimum length @@ -1168,7 +1168,8 @@ DoNotSuggestPaymentMode=Do not suggest NoActiveBankAccountDefined=No active bank account defined OwnerOfBankAccount=Owner of bank account %s BankModuleNotActive=Bank accounts module not enabled -ShowBugTrackLink=Define the link "%s" (empty to not display this link, 'github' for the link to the Dolibarr project or define directly an url 'https://...') +ShowBugTrackLink=Show the link "%s" +ShowBugTrackLinkDesc=Keep empty to not display this link, use value 'github' for the link to the Dolibarr project or define directly an url 'https://...' Alerts=Alerts DelaysOfToleranceBeforeWarning=Delay before displaying a warning alert for: DelaysOfToleranceDesc=Set the delay before an alert icon %s is shown onscreen for the late element. @@ -1218,7 +1219,7 @@ SystemAreaForAdminOnly=This area is available to administrator users only. Dolib CompanyFundationDesc=Edit the information of your company/organization. Click on "%s" button at the bottom of the page when done. AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information. AccountantFileNumber=Accountant code -DisplayDesc=Parameters affecting the look and behaviour of the application can be modified here. +DisplayDesc=Parameters affecting the look and presentation of the application can be modified here. AvailableModules=Available app/modules ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules). SessionTimeOut=Time out for session @@ -2180,3 +2181,5 @@ DashboardDisableBlockHoliday=Disable the thumb for leaves EnabledCondition=Condition to have field enabled (if not enabled, visibility will always be off) IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sale tax IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sale tax +LanguageAndPresentation=Language and presentation +SkinAndColors=Skin and colors \ No newline at end of file | ||