diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index e3bbe5b55a9..2648a8ae721 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -691,7 +691,7 @@ else /* */ /* ************************************************************************** */ $object->canvas=$canvas; - $object->state_id = GETPOST('departement_id', 'int'); + $object->state_id = GETPOST('state_id', 'int'); // We set country_id, country_code and country for the selected country $object->country_id=GETPOST('country_id','int')?GETPOST('country_id','int'):$mysoc->country_id; diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index ba6f6ea62ec..37376aceb7a 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -71,7 +71,7 @@ if ($_POST["action"] == 'add') $account->currency_code = trim($_POST["account_currency_code"]); - $account->state_id = $_POST["account_departement_id"]; + $account->state_id = $_POST["account_state_id"]; $account->country_id = $_POST["account_country_id"]; $account->min_allowed = $_POST["account_min_allowed"]; diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index f86970afc0a..cd9169e1b2c 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -285,10 +285,10 @@ abstract class ActionsContactCardCommon } // Zip - $this->tpl['select_zip'] = $formcompany->select_ziptown($this->object->zip,'zipcode',array('town','selectcountry_id','departement_id'),6); + $this->tpl['select_zip'] = $formcompany->select_ziptown($this->object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); // Town - $this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town,'town',array('zipcode','selectcountry_id','departement_id')); + $this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town,'town',array('zipcode','selectcountry_id','state_id')); if (dol_strlen(trim($this->object->country_id)) == 0) $this->object->country_id = $objsoc->country_id; @@ -432,9 +432,9 @@ abstract class ActionsContactCardCommon $this->object->address = $_POST["address"]; $this->object->zip = $_POST["zipcode"]; $this->object->town = $_POST["town"]; - $this->object->fk_departement = $_POST["departement_id"]; + $this->object->fk_departement = $_POST["state_id"]; $this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id; - $this->object->state_id = $_POST["departement_id"]; + $this->object->state_id = $_POST["state_id"]; $this->object->phone_pro = $_POST["phone_pro"]; $this->object->phone_perso = $_POST["phone_perso"]; $this->object->phone_mobile = $_POST["phone_mobile"]; diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index 1f4b6acb6fb..294458d2352 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -116,7 +116,6 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) $row_array['value'] = $row['town']; $row_array['zipcode'] = $row['zip']; } - $row_array['departement_id'] = $row['fk_county']; // deprecated $row_array['selectcountry_id'] = $row['fk_country']; $row_array['state_id'] = $row['fk_county']; diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 01052d7f642..97a0c9e9f26 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -191,7 +191,7 @@ class FormCompany * @param string $htmlname Id of department * @return void */ - function select_departement($selected='',$country_codeid=0, $htmlname='departement_id') + function select_departement($selected='',$country_codeid=0, $htmlname='state_id') { print $this->select_state($selected,$country_codeid, $htmlname); } @@ -208,7 +208,7 @@ class FormCompany * @param string $htmlname Id of department * @return string String with HTML select */ - function select_state($selected='',$country_codeid=0, $htmlname='departement_id') + function select_state($selected='',$country_codeid=0, $htmlname='state_id') { global $conf,$langs,$user; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 5045283abe3..cf47c22d1fa 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -210,7 +210,7 @@ function ajax_multiautocompleter($htmlname,$fields,$url,$option='',$minLength=2, jQuery("#'.$htmlname.'").val(item.value); // TODO move this to specific request if (item.states) { - jQuery("#departement_id").html(item.states); + jQuery("#state_id").html(item.states); } for (i=0;i 0) // Do not erase state if unknown { diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index c98c6c23e96..1d0a9c08e04 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -191,9 +191,9 @@ if ($action == 'create') // Zip / Town print ''.$langs->trans('Zip').''; - print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','departement_id'),6); + print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); print ''.$langs->trans('Town').''; - print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','departement_id')); + print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print ''; // Country @@ -510,9 +510,9 @@ else // Zip / Town print ''.$langs->trans('Zip').''; - print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','departement_id'),6); + print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); print ''.$langs->trans('Town').''; - print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','departement_id')); + print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print ''; // Country diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 6d30e8e760c..c1d9609a6c4 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -133,7 +133,7 @@ abstract class ActionsCardCommon $this->object->zip = $_POST["zipcode"]; $this->object->town = $_POST["town"]; $this->object->country_id = $_POST["country_id"]; - $this->object->state_id = $_POST["departement_id"]; + $this->object->state_id = $_POST["state_id"]; $this->object->tel = $_POST["tel"]; $this->object->fax = $_POST["fax"]; $this->object->email = trim($_POST["email"]); @@ -483,10 +483,10 @@ abstract class ActionsCardCommon } // Zip - $this->tpl['select_zip'] = $formcompany->select_ziptown($this->object->zip,'zipcode',array('town','selectcountry_id','departement_id'),6); + $this->tpl['select_zip'] = $formcompany->select_ziptown($this->object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); // Town - $this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town,'town',array('zipcode','selectcountry_id','departement_id')); + $this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town,'town',array('zipcode','selectcountry_id','state_id')); // Country $this->object->country_id = ($this->object->country_id ? $this->object->country_id : $mysoc->country_id); @@ -670,7 +670,7 @@ abstract class ActionsCardCommon $this->object->zip = $_POST["zipcode"]; $this->object->town = $_POST["town"]; $this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id; - $this->object->state_id = $_POST["departement_id"]; + $this->object->state_id = $_POST["state_id"]; $this->object->tel = $_POST["tel"]; $this->object->fax = $_POST["fax"]; $this->object->email = $_POST["email"]; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index bd1fae497f2..49b42decef4 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -54,10 +54,9 @@ class Societe extends CommonObject var $town; var $status; // 0=activity ceased, 1= in activity - var $state_id; + var $state_id; // Id of department var $state_code; var $state; - var $departement_id; // deprecated var $departement_code; // deprecated var $departement; // deprecated diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 8682058091d..9c11be40764 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -129,7 +129,7 @@ if (empty($reshook)) $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->country_id = GETPOST('country_id'); - $object->state_id = GETPOST('departement_id'); + $object->state_id = GETPOST('state_id'); $object->phone = GETPOST('phone'); $object->fax = GETPOST('fax'); $object->email = GETPOST('email'); @@ -588,7 +588,7 @@ else $object->address = GETPOST('address'); $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); - $object->state_id = GETPOST('departement_id'); + $object->state_id = GETPOST('state_id'); $object->phone = GETPOST('phone'); $object->fax = GETPOST('fax'); $object->email = GETPOST('email'); @@ -812,9 +812,9 @@ else // Zip / Town print ''.$langs->trans('Zip').''; - print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','departement_id'),6); + print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); print ''.$langs->trans('Town').''; - print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','departement_id')); + print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print ''; // Country @@ -827,7 +827,7 @@ else if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print ''.$langs->trans('State').''; - if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code,'departement_id'); + if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code,'state_id'); else print $countrynotdefined; print ''; } @@ -1069,7 +1069,7 @@ else $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->country_id = GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id; - $object->state_id = GETPOST('departement_id'); + $object->state_id = GETPOST('state_id'); $object->phone = GETPOST('phone'); $object->fax = GETPOST('fax'); $object->email = GETPOST('email'); @@ -1230,9 +1230,9 @@ else // Zip / Town print ''.$langs->trans('Zip').''; - print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','departement_id'),6); + print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); print ''.$langs->trans('Town').''; - print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','departement_id')); + print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print ''; // Country diff --git a/test/selenium/test_thirdparty.xml b/test/selenium/test_thirdparty.xml index 704796cd4c2..47a9b8091a9 100644 --- a/test/selenium/test_thirdparty.xml +++ b/test/selenium/test_thirdparty.xml @@ -38,7 +38,7 @@ select - departement_id + state_id label=01 - Ain