diff --git a/htdocs/lib/lib.js b/htdocs/lib/lib.js index e1d5a71b1b0..2653a9fd698 100644 --- a/htdocs/lib/lib.js +++ b/htdocs/lib/lib.js @@ -2,7 +2,7 @@ // Pour la fonction de saisi auto des villes // ***************************************** -function PopupPostalCode(postalcode,objectville) +function autofilltownfromzip_PopupPostalCode(postalcode,objectville) { var url = 'searchpostalcode.php?cp=' + postalcode + '&targetobject=window.opener.document.formsoc.' + objectville.name; // alert(url); @@ -10,12 +10,18 @@ function PopupPostalCode(postalcode,objectville) if((document.window != null) && (!hWnd.opener)) hWnd.opener = document.window; } -function save_refresh() +function autofilltownfromzip_save_refresh_edit() { document.formsoc.action.value="edit"; document.formsoc.submit(); } +function autofilltownfromzip_save_refresh_create() +{ + document.formsoc.action.value="create"; + document.formsoc.submit(); +} + // Pour la saisie des dates par calendrier // *************************************** diff --git a/htdocs/soc.php b/htdocs/soc.php index 9a0cd25cd5a..958809f2a79 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -216,24 +216,6 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create') print ''; } - if ($conf->global->MAIN_AUTO_FILLTOWNFROMZIP) - { - include("./soc.js.php"); - } - - print ' - - '; - print '