[-] BO : #PSTEST-769 - The default country must be pre-selected on address list

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13393 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-02-16 14:13:04 +00:00
parent b0590e342e
commit 5b942b7993
8 changed files with 48 additions and 23 deletions
@@ -137,12 +137,6 @@ class AdminWarehousesControllerCore extends AdminController
$query->where('active = 1');
$employees_array = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
// sets countries
$countries = Country::getCountries($this->context->language->id, false);
$id_default_country = Configuration::get('PS_SHOP_COUNTRY_ID');
if (isset($countries[$id_default_country]))
$countries = array($id_default_country => $countries[$id_default_country]) + $countries;
// sets the title of the toolbar
$this->toolbar_title = $this->l('Stock : Warehouse management');
@@ -222,9 +216,10 @@ class AdminWarehousesControllerCore extends AdminController
'name' => 'id_country',
'required' => true,
'options' => array(
'query' => $countries,
'query' => Country::getCountries($this->context->language->id, false),
'id' => 'id_country',
'name' => 'name'
'name' => 'name',
'preselect_country' => true,
),
'desc' => $this->l('Country where the state, region or city is located')
),