Option pour ne pas utiliser les popup Ajax
This commit is contained in:
parent
5d0f1dfe5c
commit
090f1eedad
@ -52,6 +52,7 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"]);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"]);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_AJAX", $_POST["main_disable_ajax"]);
|
||||
dolibarr_set_const($db, "MAIN_CONFIRM_AJAX", $_POST["main_confirm_ajax"]);
|
||||
dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["main_popup_calendar"]);
|
||||
dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"]);
|
||||
|
||||
@ -131,6 +132,14 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableAjax").'</td><td>';
|
||||
print $html->selectyesno('main_disable_ajax',isset($conf->global->MAIN_DISABLE_AJAX)?$conf->global->MAIN_DISABLE_AJAX:1,1);
|
||||
print ' ('.$langs->trans("AutomaticIfJavascriptDisabled").')';
|
||||
print '</td></tr>';
|
||||
|
||||
// Confirmation par popup ajax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ConfirmAjax").'</td><td>';
|
||||
print $html->selectyesno('main_confirm_ajax',isset($conf->global->MAIN_CONFIRM_AJAX)?$conf->global->MAIN_CONFIRM_AJAX:0,0);
|
||||
print ' ('.$langs->trans("AvailableOnlyIfJavascriptAndAjaxNotDisabled").')';
|
||||
print '</td></tr>';
|
||||
|
||||
// Désactiver le calendrier popup
|
||||
@ -251,6 +260,11 @@ else
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableAjax").'</td><td>';
|
||||
print yn(isset($conf->global->MAIN_DISABLE_AJAX)?$conf->global->MAIN_DISABLE_AJAX:1)."</td></tr>";
|
||||
|
||||
// Confirm ajax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ConfirmAjax").'</td><td>';
|
||||
print yn(isset($conf->global->MAIN_CONFIRM_AJAX)?$conf->global->MAIN_CONFIRM_AJAX:0)."</td></tr>";
|
||||
|
||||
// Calendrier en popup
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("UsePopupCalendar").'</td><td>';
|
||||
@ -301,7 +315,7 @@ else
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Edit").'</a>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1429,7 +1429,7 @@ if ($_GET['propalid'] > 0)
|
||||
$form_close.= '</td></tr>';
|
||||
$form_close.= '<tr><td align="center" colspan="2">';
|
||||
$form_close.= '<input type="submit" class="button" name="validate" value="'.$langs->trans('Validate').'">';
|
||||
if ($conf->use_ajax)
|
||||
if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
||||
{
|
||||
$form_close.= ' <input onClick="Dialog.closeInfo()" type="button" class="button" name="cancel" value="'.$langs->trans('Cancel').'">';
|
||||
}
|
||||
|
||||
@ -356,12 +356,15 @@ class Conf
|
||||
if (isset($this->global->MAIN_DISABLE_JAVASCRIPT)) $this->use_javascript=! $this->global->MAIN_DISABLE_JAVASCRIPT;
|
||||
|
||||
// conf->use_ajax
|
||||
$this->use_ajax=0; // Pas d' Ajax par defaut
|
||||
$this->use_ajax=0; // No Ajax by default
|
||||
if (isset($this->global->MAIN_DISABLE_AJAX)) $this->use_ajax=! $this->global->MAIN_DISABLE_AJAX;
|
||||
if ($this->global->MAIN_DISABLE_AJAX)
|
||||
// If no Javascript, Ajax is disabled.
|
||||
if (! $this->use_javascript) $this->use_ajax=0;
|
||||
// If no Ajax, Ajax features are disabled.
|
||||
if (! $this->use_ajax)
|
||||
{
|
||||
// If no Ajax, Ajax features are disabled.
|
||||
$this->global->PRODUIT_USE_SEARCH_TO_SELECT=0;
|
||||
$this->global->MAIN_CONFIRM_AJAX=0;
|
||||
}
|
||||
|
||||
// conf->use_popup_calendar
|
||||
|
||||
@ -19,7 +19,8 @@ ErrorModuleRequirePHPVersion=Error, this module requires PHP version %s or highe
|
||||
ErrorDecimalLargerThanAreForbidden=Error, precision higher than <b>%s</b> are not supported.
|
||||
DictionnarySetup=Dictionnary setup
|
||||
DisableJavascript=Disable JavaScript functions
|
||||
DisableAjax=Disable AJAX functions
|
||||
DisableAjax=Disable Ajax functions
|
||||
ConfirmAjax=Use Ajax confirmation popups
|
||||
UseSearchToSelectProduct=Use a search form to choose a company (intead of using a list box)
|
||||
NotAvailableWhenAjaxDisabled=Not available when Ajax disabled
|
||||
JavascriptDisabled=JavaScript disabled
|
||||
@ -98,7 +99,9 @@ BoxesActivated=Boxes activated
|
||||
ActivateOn=Activate on
|
||||
ActiveOn=Activated on
|
||||
SourceFile=Source file
|
||||
AutomaticIfJavascriptDisabled=Automatic if Javascript disabled
|
||||
AvailableOnlyIfJavascriptNotDisabled=Available only if JavaScript not disabled
|
||||
AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript and Ajax not disabled
|
||||
Required=Required
|
||||
Security=Security
|
||||
Passwords=Passwords
|
||||
|
||||
@ -18,8 +18,9 @@ SecuritySetup=Configuration de la s
|
||||
ErrorModuleRequirePHPVersion=Erreur, ce module requiert une version %s ou supérieure de PHP
|
||||
ErrorDecimalLargerThanAreForbidden=Erreur, les précisions supérieures à <b>%s</b> ne sont pas supportées.
|
||||
DictionnarySetup=Dictionnaires
|
||||
DisableJavascript=Désactiver les fonctions javascript
|
||||
DisableAjax=Désactiver les fonctions ajax
|
||||
DisableJavascript=Désactiver les fonctions Javascript
|
||||
DisableAjax=Désactiver les fonctions Ajax
|
||||
ConfirmAjax=Utiliser les popups de confirmation Ajax
|
||||
UseSearchToSelectCompany=Utiliser un formulaire de recherche pour choix d'un tiers (plutôt que liste déroulante)
|
||||
NotAvailableWhenAjaxDisabled=Non disponible quand Ajax désactivé
|
||||
JavascriptDisabled=Javascript désactivé
|
||||
@ -98,7 +99,9 @@ BoxesActivated=Bo
|
||||
ActivateOn=Activer sur
|
||||
ActiveOn=Active sur
|
||||
SourceFile=Fichier source
|
||||
AvailableOnlyIfJavascriptNotDisabled=Disponible uniquement si javascript non désactivé
|
||||
AutomaticIfJavascriptDisabled=Automatique si Javascript désactivé
|
||||
AvailableOnlyIfJavascriptNotDisabled=Disponible uniquement si Javascript non désactivé
|
||||
AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponible uniquement si Javascript et Ajax non désactivé
|
||||
Required=Requis
|
||||
Security=Sécurité
|
||||
Passwords=Mots de passe
|
||||
|
||||
Loading…
Reference in New Issue
Block a user