[-] BO : fix #PSTEST-697 - remove cancel button in category list

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14823 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-04-23 15:06:32 +00:00
parent 80f238df73
commit efe2c50d4d
@@ -234,14 +234,8 @@ class AdminCategoriesControllerCore extends AdminController
'href' => self::$currentIndex.'&update'.$this->table.'&id_category='.(int)Tools::getValue('id_category').'&token='.$this->token,
'desc' => $this->l('Edit')
);
$back = Tools::safeOutput(Tools::getValue('back', ''));
if (empty($back))
$back = self::$currentIndex.'&token='.$this->token;
$this->toolbar_btn['cancel'] = array(
'href' => $back,
'desc' => $this->l('Cancel')
);
}
if ($this->display == 'view')
$this->toolbar_btn['new'] = array(
'href' => self::$currentIndex.'&add'.$this->table.'&id_parent='.(int)Tools::getValue('id_category').'&token='.$this->token,
@@ -258,6 +252,17 @@ class AdminCategoriesControllerCore extends AdminController
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.$id_category,
'desc' => $this->l('Add new')
);
if (Tools::isSubmit('id_category'))
{
$back = Tools::safeOutput(Tools::getValue('back', ''));
if (empty($back))
$back = self::$currentIndex.'&token='.$this->token;
$this->toolbar_btn['back'] = array(
'href' => $back,
'desc' => $this->l('Back to list')
);
}
}
}