From ba411a2eeaf1fc95a8d29b0656eddf30b6138439 Mon Sep 17 00:00:00 2001 From: Craig Lyons Date: Thu, 19 Jun 2014 12:40:51 -0400 Subject: [PATCH] Re-add getCMSFields, inherit scaffolding, remove Sort & ParentID fields by default --- code/model/Widget.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/model/Widget.php b/code/model/Widget.php index 725a43b..dc0212a 100644 --- a/code/model/Widget.php +++ b/code/model/Widget.php @@ -78,6 +78,13 @@ class Widget extends DataObject { 'CMSTitle' => 'Title' ); + public function getCMSFields(){ + $fields = parent::getCMSFields(); + $fields->removeByName(array('Sort', 'ParentID')); + $fields->push(CheckboxField::create('Enabled')); + return $fields; + } + /** * @var WidgetController */