mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
Merge pull request #85 from webbuilders-group/1.0
BUGFIX: Fixed issue where Widget::CMSEditor() can't rename the enabled checkbox
This commit is contained in:
commit
557a7219f4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user