diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index b5ff0827d78..8e4be407b31 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -228,7 +228,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit') $var=!$var; print ''.$langs->trans("Country").''; - $form->select_pays($conf->global->MAIN_INFO_SOCIETE_PAYS,'pays_id',($conf->use_javascript?' onChange="company_save_refresh()"':'')); + $form->select_pays($conf->global->MAIN_INFO_SOCIETE_PAYS,'pays_id',($conf->use_javascript_ajax?' onChange="company_save_refresh()"':'')); print ''; $var=!$var; @@ -632,7 +632,7 @@ else } // TVA - if ($conf->use_javascript) + if ($conf->use_javascript_ajax) { print "\n"; print ''; } @@ -260,7 +260,7 @@ function affiche($tab,$rang) { global $rangLast, $idLast, $menu_handler; - if ($conf->use_javascript) + if ($conf->use_javascript_ajax) { if($rang == $rangLast) { diff --git a/htdocs/admin/produit.php b/htdocs/admin/produit.php index 7b4cc5f3555..0bffb7a37dc 100644 --- a/htdocs/admin/produit.php +++ b/htdocs/admin/produit.php @@ -213,7 +213,7 @@ print "
"; print ""; print ""; print ''.$langs->trans("UseSearchToSelectProduct").''; -if (! $conf->use_ajax) +if (! $conf->use_javascript_ajax) { print ''; print $langs->trans("NotAvailableWhenAjaxDisabled"); diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php index 521e60b3489..a2044f6e225 100644 --- a/htdocs/admin/societe.php +++ b/htdocs/admin/societe.php @@ -257,7 +257,7 @@ print ""; print ""; print ""; print ''.$langs->trans("UseSearchToSelectCompany").''; -if (! $conf->use_ajax) +if (! $conf->use_javascript_ajax) { print ''; print $langs->trans("NotAvailableWhenAjaxDisabled"); diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index a5bef2cbf41..937b5007b4a 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -120,7 +120,7 @@ $cate_arbo = $c->get_full_arbo($_GET['type']); */ -if ($conf->use_javascript) +if ($conf->use_javascript_ajax) { print ''; print ''; diff --git a/htdocs/comm/adresse_livraison.php b/htdocs/comm/adresse_livraison.php index c3af249862e..0916fd0ed33 100644 --- a/htdocs/comm/adresse_livraison.php +++ b/htdocs/comm/adresse_livraison.php @@ -230,9 +230,9 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create') print ''; print ''; print ''; @@ -335,9 +335,9 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') print ''; print ''; print ''; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index d177637c139..77bc62da942 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1161,7 +1161,7 @@ if ($_GET['propalid'] > 0) print "\n"; } - if ($conf->global->PRODUIT_USE_MARKUP && $conf->use_ajax) + if ($conf->global->PRODUIT_USE_MARKUP && $conf->use_javascript_ajax) { $formMarkup = ''."\n"; $formMarkup.= '
'.$langs->trans("CategoriesTree").'
'.$langs->trans('Zip').'use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"'; + if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"'; print '>'; - if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' '; + if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' '; print '
'.$langs->trans('Town').'
'.$langs->trans('Zip').'use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"'; + if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"'; print '>'; - if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' '; + if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' '; print '
'.$langs->trans('Town').'
'."\n"; @@ -1268,7 +1268,7 @@ if ($_GET['propalid'] > 0) print ''; $form_close.= ''; print ''; print ''; print ''; print ''; // Code TVA - if ($conf->use_javascript) + if ($conf->use_javascript_ajax) { print "\n"; print '
'; if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE) { - if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&lineid='.$objp->rowid.'&action=confirm_deleteline&confirm=yes'; print 'trans("No").'\',\'deleteline'.$i.'\')">'; @@ -1548,7 +1548,7 @@ if ($_GET['propalid'] > 0) $form_close.= '
'; $form_close.= ''; - if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $form_close.= '   '; } @@ -1577,7 +1577,7 @@ if ($_GET['propalid'] > 0) if ($propal->statut == 0 && $propal->total_ttc > 0 && $user->rights->propale->valider) { print 'use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=confirm_validate&confirm=yes'; print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmValidateProp').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'validate\')"'; @@ -1614,7 +1614,7 @@ if ($_GET['propalid'] > 0) print ''."\n"; print 'use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { print 'href="#" onClick="dialogInfo($(\'confirm_close\').innerHTML)"'."\n"; } @@ -1629,7 +1629,7 @@ if ($_GET['propalid'] > 0) if ($propal->statut == 0 && $user->rights->propale->supprimer) { print 'use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=confirm_delete&confirm=yes'; print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeleteProp').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'delete\')"'; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 1e77ae07e93..72b5257637b 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1425,7 +1425,7 @@ else print ''; if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE) { - if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?id='.$id.'&lineid='.$objp->rowid.'&action=confirm_deleteline&confirm=yes'; print 'trans("No").'\',\'deleteline'.$i.'\')">'; @@ -1657,7 +1657,7 @@ else if ($commande->statut == 0 && $commande->total_ttc > 0 && $user->rights->commande->valider) { print 'use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { // on v�rifie si la commande est en num�rotation provisoire $ref = substr($commande->ref, 1, 4); @@ -1727,7 +1727,7 @@ else if ($user->rights->commande->cloturer) { print 'use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_close&confirm=yes'; print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmCloseOrder').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'close\')"'; @@ -1747,7 +1747,7 @@ else if ($user->rights->commande->annuler && $nb_expedition == 0) { print 'use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_cancel&confirm=yes'; print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmCancelOrder').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'cancel\')"'; @@ -1764,7 +1764,7 @@ else if ($commande->statut == 0 && $user->rights->commande->supprimer) { print 'use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_delete&confirm=yes'; print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeleteOrder').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'delete\')"'; diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php index e0909226298..3833ae14d81 100644 --- a/htdocs/commonobject.class.php +++ b/htdocs/commonobject.class.php @@ -407,7 +407,7 @@ class CommonObject // On recherche les societes $sql = "SELECT s.rowid, s.nom FROM"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; - if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) + if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) { $sql.= " WHERE rowid = ".$selected; } @@ -416,7 +416,7 @@ class CommonObject $resql = $object->db->query($sql); if ($resql) { - if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) + if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) { $langs->load("companies"); $obj = $this->db->fetch_object($resql); diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php index deda6233da2..04ae8c54b0e 100644 --- a/htdocs/conf/conf.class.php +++ b/htdocs/conf/conf.class.php @@ -365,17 +365,11 @@ class Conf $this->use_preview_tabs=1; if (isset($this->global->MAIN_USE_PREVIEW_TABS)) $this->use_preview_tabs=$this->global->MAIN_USE_PREVIEW_TABS; - // conf->use_javascript - $this->use_javascript=1; - if (isset($this->global->MAIN_DISABLE_JAVASCRIPT)) $this->use_javascript=! $this->global->MAIN_DISABLE_JAVASCRIPT; - - // conf->use_ajax - $this->use_ajax=0; // No Ajax by default - if (isset($this->global->MAIN_DISABLE_AJAX)) $this->use_ajax=! $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) + // conf->use_javascript_ajax + $this->use_javascript_ajax=1; + if (isset($this->global->MAIN_DISABLE_JAVASCRIPT)) $this->use_javascript_ajax=! $this->global->MAIN_DISABLE_JAVASCRIPT; + // If no javascript_ajax, Ajax features are disabled. + if (! $this->use_javascript_ajax) { $this->global->PRODUIT_USE_SEARCH_TO_SELECT=0; $this->global->MAIN_CONFIRM_AJAX=0; diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 9569dc8160b..b9c1e9256af 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -43,12 +43,12 @@ $langs->load("interventions"); $fichinterid = isset($_GET["id"])?$_GET["id"]:''; -// S�curit� d'acc�s client et commerciaux +// Securite d'acces client et commerciaux $socid = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter'); -//R�cup�re le r�sultat de la recherche Ajax +//Recupere le resultat de la recherche Ajax //Todo: voir pour le supprimer par la suite -if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && $_POST['socid_id']) +if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && $_POST['socid_id']) { $_POST['socid'] = $_POST['socid_id']; } @@ -695,7 +695,7 @@ elseif ($_GET["id"] > 0) print ''; if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE) { - if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&ligne='.$objp->rowid.'&action=confirm_deleteline&confirm=yes'; print 'trans("No").'\',\'deleteline'.$i.'\')">'; @@ -861,7 +861,7 @@ elseif ($_GET["id"] > 0) if ($fichinter->statut == 0 && $user->rights->ficheinter->creer) { print 'use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&action=confirm_validate&confirm=yes'; print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmValidateIntervention').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'validate\')"'; @@ -877,7 +877,7 @@ elseif ($_GET["id"] > 0) if ($fichinter->statut == 0 && $user->rights->ficheinter->supprimer) { print 'use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?id='.$fichinter->id.'&action=confirm_delete&confirm=yes'; print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans("ConfirmDeleteIntervention").'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'delete\')"'; diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 23e15998caf..6c843b2233f 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -86,7 +86,7 @@ class Form $htmltext=ereg_replace("'","\'",$htmltext); $htmltext=ereg_replace("'","\'",$htmltext); - if ($conf->use_ajax && $tooltipon == 4) + if ($conf->use_javascript_ajax && $tooltipon == 4) { $s = '
'."\n"; $s.= $text; @@ -101,7 +101,7 @@ class Form } else { - if ($conf->use_javascript) + if ($conf->use_javascript_ajax) { $htmltext=eregi_replace('"',"\'",$htmltext); if ($tooltipon==1 || $tooltipon==3) @@ -378,7 +378,8 @@ class Form $sql = "SELECT rowid, code, libelle, active"; $sql.= " FROM ".MAIN_DB_PREFIX."c_pays"; $sql.= " WHERE active = 1"; - if ($conf->use_ajax && $conf->global->CODE_DE_TEST == 1) + // \TODO A virer + if ($conf->use_javascript_ajax && $conf->global->CODE_DE_TEST) { if (is_numeric($selected)) { @@ -394,7 +395,8 @@ class Form $resql=$this->db->query($sql); if ($resql) { - if ($conf->use_ajax && $conf->global->CODE_DE_TEST == 1) + // \TODO A virer + if ($conf->use_javascript_ajax && $conf->global->CODE_DE_TEST) { $langs->load("companies"); $obj = $this->db->fetch_object($resql); @@ -681,7 +683,7 @@ class Form $sql = "SELECT s.rowid, s.nom FROM"; $sql.= " ".MAIN_DB_PREFIX ."societe as s"; if ($filter) $sql.= " WHERE ".$filter; - if ($selected && $conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) + if ($selected && $conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) { if ($filter) { @@ -699,7 +701,7 @@ class Form $resql=$this->db->query($sql); if ($resql) { - if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) + if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT) { $socid = 0; if ($selected) @@ -1072,7 +1074,7 @@ class Form { $num = $this->db->num_rows($result); - if ($conf->use_ajax) + if ($conf->use_javascript_ajax) { if (! $num) { @@ -1227,7 +1229,7 @@ class Form $num = $this->db->num_rows($result); - if ($conf->use_ajax) + if ($conf->use_javascript_ajax) { if (! $num) { @@ -2767,7 +2769,7 @@ class Form /* * Affiche date en popup */ - if ($conf->use_javascript && $conf->use_popup_calendar) + if ($conf->use_javascript_ajax && $conf->use_popup_calendar) { //print "e".$set_time." t ".$conf->format_date_short; if ($set_time > 0) @@ -2818,7 +2820,7 @@ class Form /* * Affiche date en select */ - if (! $conf->use_javascript || ! $conf->use_popup_calendar) + if (! $conf->use_javascript_ajax || ! $conf->use_popup_calendar) { /* if ($set_time == -1) diff --git a/htdocs/includes/boxes/modules_boxes.php b/htdocs/includes/boxes/modules_boxes.php index 8e6e8a71313..0727bd0ba36 100644 --- a/htdocs/includes/boxes/modules_boxes.php +++ b/htdocs/includes/boxes/modules_boxes.php @@ -124,7 +124,7 @@ class ModeleBoxes print ' 0) { print ' colspan="'.$nbcol.'"'; } print '>'; - if ($conf->use_ajax) + if ($conf->use_javascript_ajax) { print '
'; } @@ -138,7 +138,7 @@ class ModeleBoxes { print ' '.img_picto($head['subtext'],$head['subpicto']).''; } - if ($conf->use_ajax) + if ($conf->use_javascript_ajax) { print ''; print img_picto($langs->trans("MoveBox",$this->box_id),'uparrow','style="cursor:move;"'); diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index 05ee0bffe2c..48765c57f64 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -183,7 +183,7 @@ class MenuLeft { if ($user->rights->societe->creer) { $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewThirdParty")); - if (! $conf->use_javascript) $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&private=1",$langs->trans("MenuNewPrivateIndividual")); + if (! $conf->use_javascript_ajax) $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&private=1",$langs->trans("MenuNewPrivateIndividual")); } if(is_dir("societe/groupe")) diff --git a/htdocs/index.php b/htdocs/index.php index 38182ff159b..d2fb1e8e861 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -619,7 +619,7 @@ if (sizeof($boxarray)) print "
"; } -if ($conf->use_ajax) +if ($conf->use_javascript_ajax) { print "\n"; print ''."\n"; } - if (! $disablejs && $conf->use_ajax) + if (! $disablejs && $conf->use_javascript_ajax) { require_once DOL_DOCUMENT_ROOT.'/lib/ajax.lib.php'; @@ -976,7 +976,7 @@ function llxFooter($foot='',$limitIEbug=1) print "\n"; } - if ($conf->use_javascript) + if ($conf->use_javascript_ajax) { print ''; } diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 9f7515dccb2..8f629a76ad6 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -48,7 +48,7 @@ if (! $user->rights->produit->lire) accessforbidden(); //Récupère le résultat de la recherche Ajax //Todo: voir pour le supprimer par la suite -if ($conf->use_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && $_POST['id_fourn_id']) +if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT && $_POST['id_fourn_id']) { $_POST['id_fourn'] = $_POST['id_fourn_id']; } diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index 92fe3ab1e79..af23a7e3b13 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -233,7 +233,7 @@ if ($_GET["id"] || $_GET["ref"]) } if ($user->rights->produit->creer) { - if ($conf->use_ajax && $conf->global->MAIN_CONFIRM_AJAX) + if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { $url = $_SERVER["PHP_SELF"].'?id='.$product->id.'&file='.urlencode($pdir.$viewfilename).'&action=confirm_delete&confirm=yes'; print '
trans("No").'\',\'delete\')"'; diff --git a/htdocs/soc.php b/htdocs/soc.php index 32e2145e5fb..27287cb3227 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -309,8 +309,7 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] || print_titre($langs->trans("NewCompany")); - //$conf->use_javascript=0; - if ($conf->use_javascript) + if ($conf->use_javascript_ajax) { print "
\n"; print $langs->trans("ThirdPartyType").':   '; @@ -414,14 +413,14 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] || print '
'.$langs->trans('Zip').'use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"'; + if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onChange="autofilltownfromzip_PopupPostalCode(cp.value,ville)"'; print '>'; - if ($conf->use_javascript && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' '; + if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' '; print ''.$langs->trans('Town').'
'.$langs->trans('Country').''; - $form->select_pays($soc->pays_id,'pays_id',$conf->use_javascript?' onChange="autofilltownfromzip_save_refresh_create()"':''); + $form->select_pays($soc->pays_id,'pays_id',$conf->use_javascript_ajax?' onChange="autofilltownfromzip_save_refresh_create()"':''); print '
'.$langs->trans('State').''; @@ -526,7 +525,7 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] || print '