diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index e0ab6076fc5..9bfb6e74e64 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -228,4 +228,5 @@ ReportPeriod=Report period ReportDescription=Description Report=Report Keyword=Mot clé -Legend=Legend \ No newline at end of file +Legend=Legend +FillTownFromZip=Fill town from zip \ No newline at end of file diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 30024c68727..5450ddd6926 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -228,4 +228,5 @@ ReportPeriod=P ReportDescription=Description Report=Rapport Keyword=Mot clé -Legend=Légende \ No newline at end of file +Legend=Légende +FillTownFromZip=Renseigner ville \ No newline at end of file diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index ace07e4656d..758372190b0 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -178,8 +178,17 @@ setlocale(LC_ALL, $conf->langage); require_once(DOL_DOCUMENT_ROOT ."/translate.class.php"); $langs = new Translate(DOL_DOCUMENT_ROOT ."/langs", $conf->langage); +/* + * Active fonction remplissage ville depuis cp + */ +if (defined('MAIN_AUTO_FILLTOWNFROMZIP') && MAIN_AUTO_FILLTOWNFROMZIP == 1) +{ +$conf->filltownfromzip=MAIN_AUTO_FILLTOWNFROMZIP; +} - +/* + * Autres paramètres globaux de configurations + */ $conf->users->dir_output=DOL_DATA_ROOT."/users"; /* diff --git a/htdocs/soc.php b/htdocs/soc.php index 50eff310068..414548e240a 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -236,7 +236,11 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create') print $soc->adresse; print ''; - print ''.$langs->trans('Zip').''; + print ''.$langs->trans('Zip').'filltownfromzip) print ' onblur="PopupPostalCode(cp.value,ville)"'; + print '>'; + if ($conf->filltownfromzip) print ' '; + print ''; print ''.$langs->trans('Town').''; print ''.$langs->trans('State').'';