Remove deprecated code of old autoziptown

This commit is contained in:
Laurent Destailleur 2010-10-13 13:17:44 +00:00
parent c51ba22e0e
commit 6809dfa460
2 changed files with 7 additions and 4 deletions

View File

@ -102,8 +102,13 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
$country = $row['fk_country']?($langs->trans('Country'.$row['country_code'])!='Country'.$row['country_code']?$langs->trans('Country'.$row['country_code']):$row['country']):'';
$county = $row['fk_county']?($langs->trans($row['county_code'])!=$row['county_code']?$langs->trans($row['county_code']):($row['county']!='-'?$row['county']:'')):'';
$row_array['label'] = $row['zip'].' '.$row['town'].' ('.($county?$county.' - ':'').$country.')';
if ($zipcode)
$row_array['label'] = $row['zip'].' '.$row['town'];
$row_array['label'] .= ($county || $country)?'(':'';
$row_array['label'] .= $county;
$row_array['label'] .= ($county && $country?' - ':'');
$row_array['label'] .= $country;
$row_array['label'] .= ($county || $country)?')':'';
if ($zipcode)
{
$row_array['value'] = $row['zip'];
$row_array['town'] = $row['town'];

View File

@ -124,8 +124,6 @@ class ActionsCardCommon
$this->tpl['suppliercategory'] = $this->object->SupplierCategories;
$this->tpl['select_suppliercategory'] = $form->selectarray("fournisseur_categorie",$this->object->SupplierCategories,$_POST["fournisseur_categorie"],1);
if ($conf->use_javascript_ajax && $conf->global->MAIN_AUTOFILL_TOWNFROMZIP) $this->tpl['autofilltownfromzip'] = '<input class="button" type="button" name="searchpostalcode" value="'.$langs->trans('FillTownFromZip').'" onclick="autofilltownfromzip_PopupPostalCode(\''.DOL_URL_ROOT.'\',cp.value,ville,pays_id,departement_id)">';
// Country
$this->tpl['select_country'] = $form->select_country($this->object->pays_id,'pays_id');
$countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';