// small fix

This commit is contained in:
Rémi Gaillard
2013-06-25 15:50:36 +02:00
parent 502472dfba
commit f73eb070ab
+16 -13
View File
@@ -165,19 +165,22 @@ class AdminTabsControllerCore extends AdminController
'class' => 'button'
)
);
if (!Validate::isLoadedObject($this->object) || $this->object->id_parent > 0)
$this->fields_form['input'][] = array(
'type' => 'select',
'label' => $this->l('Parent:'),
'name' => 'id_parent',
'options' => array(
'query' => $tabs,
'id' => 'id_tab',
'name' => 'name'
)
);
$display_parent = true;
if (Validate::isLoadedObject($this->object) && !class_exists($this->object->class_name.'Controller'))
$display_parent = false;
if ($display_parent)
$this->fields_form['input'][] = array(
'type' => 'select',
'label' => $this->l('Parent:'),
'name' => 'id_parent',
'options' => array(
'query' => $tabs,
'id' => 'id_tab',
'name' => 'name'
)
);
return parent::renderForm();
}