From 6809dfa460ac2f0c121b6ce292ac527d03b1e4e2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Wed, 13 Oct 2010 13:17:44 +0000 Subject: [PATCH] Remove deprecated code of old autoziptown --- htdocs/societe/ajaxziptown.php | 9 +++++++-- htdocs/societe/canvas/actions_card_common.class.php | 2 -- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/ajaxziptown.php b/htdocs/societe/ajaxziptown.php index 87877791f7b..1a34dcd4f84 100644 --- a/htdocs/societe/ajaxziptown.php +++ b/htdocs/societe/ajaxziptown.php @@ -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']; diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 69b666f2b23..8bb6d99faac 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -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").')'; -- GitLab