[+] Project : Possibility to enable or disable tabs
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11581 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -60,6 +60,14 @@ class AdminTabsControllerCore extends AdminController
|
||||
'module' => array(
|
||||
'title' => $this->l('Module')
|
||||
),
|
||||
'active' => array(
|
||||
'title' => $this->l('Enabled'),
|
||||
'width' => 70,
|
||||
'align' => 'center',
|
||||
'active' => 'status',
|
||||
'type' => 'bool',
|
||||
'orderby' => false
|
||||
),
|
||||
'position' => array(
|
||||
'title' => $this->l('Position'),
|
||||
'width' => 40,
|
||||
@@ -123,6 +131,27 @@ class AdminTabsControllerCore extends AdminController
|
||||
'name' => 'icon',
|
||||
'desc' => $this->l('Upload logo from your computer').' (.gif, .jpg, .jpeg '.$this->l('or').' .png)'
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Status:'),
|
||||
'name' => 'active',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
'is_bool' => true,
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Enabled')
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
'desc' => $this->l('Show or hide tab.')
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Parent:'),
|
||||
@@ -242,7 +271,8 @@ class AdminTabsControllerCore extends AdminController
|
||||
else
|
||||
{
|
||||
// Temporary add the position depend of the selection of the parent category
|
||||
$_POST['position'] = Tab::getNbTabs(Tools::getValue('id_parent'));
|
||||
if (!Tools::isSubmit('id_tab')) // @todo Review
|
||||
$_POST['position'] = Tab::getNbTabs(Tools::getValue('id_parent'));
|
||||
parent::postProcess();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user