From 2f08f6a2920c486a7b64e4448ffe3c906d136f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Mon, 25 Feb 2013 16:45:17 +0100 Subject: [PATCH] [-] BO: Fix form displayed for features add after error --- controllers/admin/AdminFeaturesController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminFeaturesController.php b/controllers/admin/AdminFeaturesController.php index 2a22f1c98..20b999d59 100644 --- a/controllers/admin/AdminFeaturesController.php +++ b/controllers/admin/AdminFeaturesController.php @@ -374,8 +374,6 @@ class AdminFeaturesControllerCore extends AdminController parent::initProcess(); - if ($this->table == 'feature_value' && ($this->display == 'edit' || $this->display == 'add')) - $this->display = 'editFeatureValue'; } public function postProcess() @@ -391,6 +389,9 @@ class AdminFeaturesControllerCore extends AdminController array('errors' => &$this->errors)); // send errors as reference to allow displayFeaturePostProcess to stop saving process parent::postProcess(); + + if ($this->table == 'feature_value' && ($this->display == 'edit' || $this->display == 'add')) + $this->display = 'editFeatureValue'; } /** @@ -403,7 +404,7 @@ class AdminFeaturesControllerCore extends AdminController if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token; - else if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && count($this->errors)) + elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && count($this->errors)) $this->display = 'editFeatureValue'; return $object;