// little fix about adding a category

This commit is contained in:
vChabot committed 2012-02-10 10:49:44 +00:00
1 parent 040620d7c5
commit 994cdb1231
1 file changed
+1 -1
@@ -426,7 +426,7 @@ class AdminCategoriesControllerCore extends AdminController
'values' => Shop::getTree() 'values' => Shop::getTree()
); );
// 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) 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)
if (in_array($input['name'], array('id_parent', 'is_root_category'))) if (in_array($input['name'], array('id_parent', 'is_root_category')))
unset($this->fields_form['input'][$k]); unset($this->fields_form['input'][$k]);