[-] BO : fix #PSTEST-697 - remove cancel button in category list
This commit is contained in:
1 parent
28fb76ba4a
commit
2c740ae4a1
1 file changed
+12
-7
@@ -234,14 +234,8 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
'href' => self::$currentIndex.'&update'.$this->table.'&id_category='.(int)Tools::getValue('id_category').'&token='.$this->token,
|
'href' => self::$currentIndex.'&update'.$this->table.'&id_category='.(int)Tools::getValue('id_category').'&token='.$this->token,
|
||||||
'desc' => $this->l('Edit')
|
'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')
|
if ($this->display == 'view')
|
||||||
$this->toolbar_btn['new'] = array(
|
$this->toolbar_btn['new'] = array(
|
||||||
'href' => self::$currentIndex.'&add'.$this->table.'&id_parent='.(int)Tools::getValue('id_category').'&token='.$this->token,
|
'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,
|
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.$id_category,
|
||||||
'desc' => $this->l('Add new')
|
'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')
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user