diff --git a/htdocs/soc.php b/htdocs/soc.php index 8b44fed1eb3..c81de4de6a4 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -171,7 +171,10 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create') print ''; } - include("./soc.js.php"); + if ($conf->global->MAIN_AUTO_FILLTOWNFROMZIP) + { + include("./soc.js.php"); + } print '
'; @@ -319,6 +322,12 @@ elseif ($_GET["action"] == 'edit') if ($_GET["socid"]) { + + if ($conf->global->MAIN_AUTO_FILLTOWNFROMZIP) + { + include("./soc.js.php"); + } + if ($no_reload <> 1) { $soc = new Societe($db); @@ -333,7 +342,7 @@ elseif ($_GET["action"] == 'edit') print ''; } - print ''; + print ''; print ''; print ''; print ''; @@ -383,7 +392,12 @@ elseif ($_GET["action"] == 'edit') print $soc->adresse; print ''; - print ''.$langs->trans('Zip').''; + print ''.$langs->trans('Zip').'global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onblur="PopupPostalCode(cp.value,ville)"'; + print '>'; + if ($conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' '; + print ''; + print ''.$langs->trans('Town').''; print ''.$langs->trans('State').'';