mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Make sure option gridfield is created before the UpdateCMSFields function so we can override fields in extensions
This commit is contained in:
parent
aa171f8e45
commit
8af5ff93c3
@ -33,8 +33,7 @@ class EditableMultipleOptionField extends EditableFormField
|
|||||||
*/
|
*/
|
||||||
public function getCMSFields()
|
public function getCMSFields()
|
||||||
{
|
{
|
||||||
$fields = parent::getCMSFields();
|
$this->beforeUpdateCMSFields(function($fields) {
|
||||||
|
|
||||||
$editableColumns = new GridFieldEditableColumns();
|
$editableColumns = new GridFieldEditableColumns();
|
||||||
$editableColumns->setDisplayFields(array(
|
$editableColumns->setDisplayFields(array(
|
||||||
'Title' => array(
|
'Title' => array(
|
||||||
@ -77,6 +76,9 @@ class EditableMultipleOptionField extends EditableFormField
|
|||||||
|
|
||||||
$fields->insertAfter(new Tab('Options', _t('EditableMultipleOptionField.OPTIONSTAB', 'Options')), 'Main');
|
$fields->insertAfter(new Tab('Options', _t('EditableMultipleOptionField.OPTIONSTAB', 'Options')), 'Main');
|
||||||
$fields->addFieldToTab('Root.Options', $optionsGrid);
|
$fields->addFieldToTab('Root.Options', $optionsGrid);
|
||||||
|
});
|
||||||
|
|
||||||
|
$fields = parent::getCMSFields();
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user