[-] BO: This is now not possible to move a tab with id_parent = 0 to an another tab
This commit is contained in:
@@ -159,22 +159,25 @@ class AdminTabsControllerCore extends AdminController
|
|||||||
),
|
),
|
||||||
'desc' => $this->l('Show or hide menu.')
|
'desc' => $this->l('Show or hide menu.')
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'type' => 'select',
|
|
||||||
'label' => $this->l('Parent:'),
|
|
||||||
'name' => 'id_parent',
|
|
||||||
'options' => array(
|
|
||||||
'query' => $tabs,
|
|
||||||
'id' => 'id_tab',
|
|
||||||
'name' => 'name'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
'submit' => array(
|
'submit' => array(
|
||||||
'title' => $this->l(' Save '),
|
'title' => $this->l(' Save '),
|
||||||
'class' => 'button'
|
'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'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
return parent::renderForm();
|
return parent::renderForm();
|
||||||
}
|
}
|
||||||
@@ -324,4 +327,4 @@ class AdminTabsControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user