From b5e353906c522add437a607b5e24cf0aee3bd690 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 10 Mar 2006 14:26:17 +0000 Subject: [PATCH] =?UTF-8?q?Ajout:=20=20activation/d=E9sactivation=20du=20c?= =?UTF-8?q?alendrier=20popup=20dans=20la=20configuration=20de=20l'interfac?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/ihm.php | 12 ++++++++++++ htdocs/html.form.class.php | 7 ++----- htdocs/langs/en_US/admin.lang | 1 + htdocs/langs/fr_FR/admin.lang | 1 + htdocs/master.inc.php | 4 ++++ 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 348b5e54a38..6544ea7b769 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -52,6 +52,7 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update') dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"]); dolibarr_set_const($db, "SIZE_LISTE_LIMIT", $_POST["size_liste_limit"]); dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["disable_javascript"]); + dolibarr_set_const($db, "MAIN_DISABLE_POPUP_CALENDAR", $_POST["disable_popup_calendar"]); dolibarr_set_const($db, "MAIN_SHOW_BUGTRACK_LINK", $_POST["bugtrack"]); dolibarr_set_const($db, "MAIN_SHOW_WORKBOARD", $_POST["workboard"]); @@ -119,6 +120,12 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') print ''.$langs->trans("DisableJavascript").''; $html->selectyesnonum('disable_javascript',$conf->global->MAIN_DISABLE_JAVASCRIPT); print ''; + + // Désactiver le calendrier popup + $var=!$var; + print ''.$langs->trans("DisablePopupCalendar").''; + $html->selectyesnonum('disable_popup_calendar',$conf->global->MAIN_DISABLE_POPUP_CALENDAR); + print ''; print '
'; @@ -217,6 +224,11 @@ else $var=!$var; print ''.$langs->trans("DisableJavascript").''; print ($conf->global->MAIN_DISABLE_JAVASCRIPT?$langs->trans("yes"):$langs->trans("no")).""; + + // Disable popup calendar + $var=!$var; + print ''.$langs->trans("DisablePopupCalendar").''; + print ($conf->global->MAIN_DISABLE_POPUP_CALENDAR?$langs->trans("yes"):$langs->trans("no")).""; print '
'; diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 0dbdc07c587..37f1f23f7bb 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -1618,13 +1618,10 @@ class Form $smin = ''; } - // \todo Externaliser ce parametre dans page config interface - $conf->use_popup_date=1; - /* * Affiche date en popup */ - if ($conf->use_javascript && $conf->use_popup_date && $h==0 && $m==0) + if ($conf->use_javascript && $conf->use_popup_calendar && $h==0 && $m==0) { if ($langs->defaultlang != "") @@ -1652,7 +1649,7 @@ class Form /* * Affiche date en select */ - if (! $conf->use_javascript || ! $conf->use_popup_date) + if (! $conf->use_javascript || ! $conf->use_popup_calendar) { // Jour diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5e7c33cfad3..b3e225fc4aa 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -14,6 +14,7 @@ GUISetup=GUI setup ErrorModuleRequirePHPVersion=Error, this module require PHP version %s or higher DictionnarySetup=Dictionnary setup DisableJavascript=Disable javascript functions +DisablePopupCalendar=Disable popup calendar NextValue=Next value ComptaSetup=Accounting module setup UserSetup=Users' management setup diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 93447e3f257..6660b68d5d7 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -14,6 +14,7 @@ GUISetup=Interface ErrorModuleRequirePHPVersion=Erreur, ce module requiert une version %s ou supérieure de PHP DictionnarySetup=Dictionnaires DisableJavascript=Désactiver les fonctions javascript +DisablePopupCalendar=Désactiver le calendrier popup NextValue=Prochaine valeur ComptaSetup=Configuration du module Comptabilité UserSetup=Configuration gestion des utilisateurs diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index a9bc1663005..38906d57026 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -347,6 +347,10 @@ if (isset($conf->global->MAIN_USE_PREVIEW_TABS)) $conf->use_preview_tabs=$conf-> $conf->use_javascript=1; if (isset($conf->global->MAIN_DISABLE_JAVASCRIPT)) $conf->use_javascript=! $conf->global->MAIN_DISABLE_JAVASCRIPT; +// conf->use_popup_calendar +$conf->use_popup_calendar=1; +if (isset($conf->global->MAIN_DISABLE_POPUP_CALENDAR)) $conf->use_popup_calendar=! $conf->global->MAIN_DISABLE_JAVASCRIPT; + // conf->monnaie if (! $conf->global->MAIN_MONNAIE) $conf->global->MAIN_MONNAIE='EUR'; $conf->monnaie=$conf->global->MAIN_MONNAIE;