// Hide "is root category" option outside multistore
This commit is contained in:
1 parent
4bd59c14cc
commit
38753716e2
1 file changed
+22
-20
@@ -390,26 +390,6 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
'use_context' => true,
|
'use_context' => true,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'type' => 'radio',
|
|
||||||
'label' => $this->l('Root Category:'),
|
|
||||||
'name' => 'is_root_category',
|
|
||||||
'required' => false,
|
|
||||||
'is_bool' => true,
|
|
||||||
'class' => 't',
|
|
||||||
'values' => array(
|
|
||||||
array(
|
|
||||||
'id' => 'is_root_on',
|
|
||||||
'value' => 1,
|
|
||||||
'label' => $this->l('Yes')
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'id' => 'is_root_off',
|
|
||||||
'value' => 0,
|
|
||||||
'label' => $this->l('No')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
'type' => 'textarea',
|
'type' => 'textarea',
|
||||||
'label' => $this->l('Description:'),
|
'label' => $this->l('Description:'),
|
||||||
@@ -478,11 +458,33 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
$this->tpl_form_vars['shared_category'] = Validate::isLoadedObject($obj) && $obj->hasMultishopEntries();
|
$this->tpl_form_vars['shared_category'] = Validate::isLoadedObject($obj) && $obj->hasMultishopEntries();
|
||||||
$this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL');
|
$this->tpl_form_vars['PS_ALLOW_ACCENTED_CHARS_URL'] = (int)Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL');
|
||||||
if (Shop::isFeatureActive())
|
if (Shop::isFeatureActive())
|
||||||
|
{
|
||||||
$this->fields_form['input'][] = array(
|
$this->fields_form['input'][] = array(
|
||||||
'type' => 'shop',
|
'type' => 'shop',
|
||||||
'label' => $this->l('Shop association:'),
|
'label' => $this->l('Shop association:'),
|
||||||
'name' => 'checkBoxShopAsso',
|
'name' => 'checkBoxShopAsso',
|
||||||
);
|
);
|
||||||
|
$this->fields_form['input'][] = array(
|
||||||
|
'type' => 'radio',
|
||||||
|
'label' => $this->l('Root Category:'),
|
||||||
|
'name' => 'is_root_category',
|
||||||
|
'required' => false,
|
||||||
|
'is_bool' => true,
|
||||||
|
'class' => 't',
|
||||||
|
'values' => array(
|
||||||
|
array(
|
||||||
|
'id' => 'is_root_on',
|
||||||
|
'value' => 1,
|
||||||
|
'label' => $this->l('Yes')
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'id' => 'is_root_off',
|
||||||
|
'value' => 0,
|
||||||
|
'label' => $this->l('No')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
// remove category tree and radio button "is_root_category" if this category has the root category as parent category to avoid any conflict
|
// remove category tree and radio button "is_root_category" if this category has the root category as parent category to avoid any conflict
|
||||||
if ($this->_category->id_parent == Category::getTopCategory()->id && Tools::isSubmit('updatecategory'))
|
if ($this->_category->id_parent == Category::getTopCategory()->id && Tools::isSubmit('updatecategory'))
|
||||||
foreach ($this->fields_form['input'] as $k => $input)
|
foreach ($this->fields_form['input'] as $k => $input)
|
||||||
|
|||||||
Reference in new issue
Block a user