[-] BO : #PSTEST-925 : BugFix - Bad redirect when creating new store / shop with submit error
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13969 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -431,9 +431,12 @@ class AdminShopControllerCore extends AdminController
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->fields_value = array(
|
$this->fields_value = array(
|
||||||
'id_group_shop' => (isset($obj->id_group_shop)) ? $obj->id_group_shop : Shop::getContextGroupShopID(),
|
'id_group_shop' => (Tools::getValue('id_group_shop') ? Tools::getValue('id_group_shop') :
|
||||||
'active' => true,
|
(isset($obj->id_group_shop)) ? $obj->id_group_shop : Shop::getContextGroupShopID()),
|
||||||
'id_theme_checked' => isset($obj->id_theme) ? $obj->id_theme : $id_theme
|
'id_category' => (Tools::getValue('id_category') ? Tools::getValue('id_category') :
|
||||||
|
(isset($obj->id_group_shop)) ? $obj->id_group_shop : Shop::getContextGroupShopID()),
|
||||||
|
'active' => (Tools::getValue('active') ? true : false),
|
||||||
|
'id_theme_checked' => (isset($obj->id_theme) ? $obj->id_theme : $id_theme)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->tpl_form_vars = array(
|
$this->tpl_form_vars = array(
|
||||||
@@ -490,7 +493,10 @@ class AdminShopControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->errors = array_unique($this->errors);
|
$this->errors = array_unique($this->errors);
|
||||||
if (count($this->errors) > 0)
|
if (count($this->errors) > 0)
|
||||||
return;
|
{
|
||||||
|
$this->display = 'add';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// datas to import
|
// datas to import
|
||||||
$import_data = Tools::getValue('importData');
|
$import_data = Tools::getValue('importData');
|
||||||
|
|||||||
@@ -196,7 +196,8 @@ class AdminStoresControllerCore extends AdminController
|
|||||||
'required' => true,
|
'required' => true,
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'id' => 'id_state',
|
'id' => 'id_state',
|
||||||
'name' => 'name'
|
'name' => 'name',
|
||||||
|
'query' => null
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
@@ -369,6 +370,8 @@ class AdminStoresControllerCore extends AdminController
|
|||||||
|
|
||||||
if (!count($this->errors))
|
if (!count($this->errors))
|
||||||
parent::postProcess();
|
parent::postProcess();
|
||||||
|
else
|
||||||
|
$this->display = 'add';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function postImage($id)
|
protected function postImage($id)
|
||||||
|
|||||||
Reference in New Issue
Block a user