Qual: La totalit du code javascript de l'autoremplissage de ville est mis dans soc.js.php

Look: Uniformisation du look de la popup de remplissage automatique de ville
This commit is contained in:
Laurent Destailleur 2005-08-20 16:45:41 +00:00
parent d28cf7ac61
commit 82d59277f9
4 changed files with 7 additions and 15 deletions

View File

@ -171,14 +171,6 @@ define('FPDF_FONTPATH', FPDF_PATH . 'font/');
require_once(FPDF_PATH . "fpdf.php");
/*
* 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
*/

View File

@ -80,7 +80,7 @@ if ($user->societe_id > 0)
top_htmlhead($head, $title, $target);
top_htmlhead("", $langs->trans("SearchTown"), "");
print "

View File

@ -10,4 +10,8 @@ $js_OpenPopupWindow = "function PopupPostalCode(postalcode,objectville)
}
";
print '<script language="javascript">'."\n";
print $js_OpenPopupWindow;
print "\n</script>\n";
?>

View File

@ -173,10 +173,6 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
include("./soc.js.php");
print '<script language="javascript">'."\n";
print $js_OpenPopupWindow;
print "\n</script>\n";
print '<form action="soc.php" method="post" name="formsoc">';
print '<input type="hidden" name="codeclient_modifiable" value="1">';
@ -260,9 +256,9 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
print '</textarea></td></tr>';
print '<tr><td>'.$langs->trans('Zip').'</td><td><input size="6" type="text" name="cp" value="'.$soc->cp.'"';
if ($conf->filltownfromzip) print ' onblur="PopupPostalCode(cp.value,ville)"';
if ($conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' onblur="PopupPostalCode(cp.value,ville)"';
print '>';
if ($conf->filltownfromzip) print ' <input type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="PopupPostalCode(cp.value,ville)">';
if ($conf->global->MAIN_AUTO_FILLTOWNFROMZIP) print ' <input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="PopupPostalCode(cp.value,ville)">';
print '</td>';
print '<td>'.$langs->trans('Town').'</td><td><input type="text" name="ville" value="'.$soc->ville.'"></td></tr>';