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

This commit is contained in:
tDidierjean
2012-04-23 15:06:32 +00:00
parent 28fb76ba4a
commit 2c740ae4a1
@@ -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')
);
}
}
}