From b6a7c6f9e4a3fb49e1b8cb9e894e07a1cf0f29ae Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Thu, 8 Mar 2012 09:22:04 +0000 Subject: [PATCH] [-] BO : #PSTEST-989 - Remove button "Save and add" on form add/edit attribute group --- .../admin/AdminAttributesGroupsController.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index 4be0fdd19..536eb9ef6 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -386,7 +386,7 @@ class AdminAttributesGroupsControllerCore extends AdminController if ($this->display == 'add') $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$token; else - $this->redirect_after = self::$currentIndex.'&id_attribute_group='.(int)Tools::getValue('id_attribute_group').'&'.$this->identifier.'&conf=3&update'.$this->table.'&token='.$token; + $this->redirect_after = self::$currentIndex.'&id_attribute_group='.(int)Tools::getValue('id_attribute_group').'&conf=3&update'.$this->table.'&token='.$token; } if (count($this->errors)) @@ -469,12 +469,13 @@ class AdminAttributesGroupsControllerCore extends AdminController 'desc' => $this->l('Save') ); - $this->toolbar_btn['save-and-stay'] = array( - 'short' => 'SaveAndStay', - 'href' => '#', - 'desc' => $this->l('Save and add'), - 'force_desc' => true, - ); + if ($this->display == 'editAttributes') + $this->toolbar_btn['save-and-stay'] = array( + 'short' => 'SaveAndStay', + 'href' => '#', + 'desc' => $this->l('Save and add'), + 'force_desc' => true, + ); $back = self::$currentIndex.'&token='.$this->token; $this->toolbar_btn['back'] = array(