activation/dsactivation du calendrier popup dans la configuration de l'interface
This commit is contained in:
Regis Houssin 2006-03-10 14:26:17 +00:00
parent 490bca3772
commit b5e353906c
5 changed files with 20 additions and 5 deletions

View File

@ -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 '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
$html->selectyesnonum('disable_javascript',$conf->global->MAIN_DISABLE_JAVASCRIPT);
print '</td></tr>';
// Désactiver le calendrier popup
$var=!$var;
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("DisablePopupCalendar").'</td><td>';
$html->selectyesnonum('disable_popup_calendar',$conf->global->MAIN_DISABLE_POPUP_CALENDAR);
print '</td></tr>';
print '</table><br>';
@ -217,6 +224,11 @@ else
$var=!$var;
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
print ($conf->global->MAIN_DISABLE_JAVASCRIPT?$langs->trans("yes"):$langs->trans("no"))."</td></tr>";
// Disable popup calendar
$var=!$var;
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("DisablePopupCalendar").'</td><td>';
print ($conf->global->MAIN_DISABLE_POPUP_CALENDAR?$langs->trans("yes"):$langs->trans("no"))."</td></tr>";
print '</table><br>';

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;