[-] BO : fix #PSCFV-2369 - post data is lost if there is an error while saving
This commit is contained in:
1 parent
2fb38fecd3
commit
2a1e2332d7
1 file changed
+4
@@ -2242,6 +2242,10 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->_displayDraftWarning($this->object->active);
|
$this->_displayDraftWarning($this->object->active);
|
||||||
|
|
||||||
|
// if there was an error while saving, we don't want to lose posted data
|
||||||
|
if (!empty($this->errors))
|
||||||
|
$this->copyFromPost($this->object, $this->table);
|
||||||
|
|
||||||
$this->initPack($this->object);
|
$this->initPack($this->object);
|
||||||
$this->{'initForm'.$this->tab_display}($this->object);
|
$this->{'initForm'.$this->tab_display}($this->object);
|
||||||
$this->tpl_form_vars['product'] = $this->object;
|
$this->tpl_form_vars['product'] = $this->object;
|
||||||
|
|||||||
Reference in new issue
Block a user