BUGFIX: Fixed issue where Widget::CMSEditor() can't see the enabled checkbox

This commit is contained in:
UndefinedOffset 2015-04-01 11:54:13 -03:00
parent 871ba84d97
commit 54599b98d1

View File

@ -159,10 +159,18 @@ class Widget extends DataObject {
* @return FieldList
*/
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields = $this->scaffoldFormFields(array(
// Don't allow has_many/many_many relationship editing before the record is first saved
'includeRelations' => ($this->ID > 0),
'tabbed' => false,
'ajaxSafe' => true
));
$fields->removeByName('ParentID');
$fields->removeByName('Sort');
$this->extend('updateCMSFields', $tabbedFields);
return $fields;
}