mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
FIX Show correct class names in field editor GridField dropdowns
This commit is contained in:
parent
d90d54186e
commit
100b84dc08
@ -76,16 +76,20 @@ class UserFormFieldEditorExtension extends DataExtension
|
|||||||
$editableColumns = new GridFieldEditableColumns();
|
$editableColumns = new GridFieldEditableColumns();
|
||||||
$fieldClasses = singleton(EditableFormField::class)->getEditableFieldClasses();
|
$fieldClasses = singleton(EditableFormField::class)->getEditableFieldClasses();
|
||||||
$editableColumns->setDisplayFields([
|
$editableColumns->setDisplayFields([
|
||||||
'ClassName' => function ($record, $column, $grid) use ($fieldClasses) {
|
'ClassName' => [
|
||||||
if ($record instanceof EditableFormField) {
|
'callback' => function ($record, $column, $grid) use ($fieldClasses) {
|
||||||
return $record->getInlineClassnameField($column, $fieldClasses);
|
if ($record instanceof EditableFormField) {
|
||||||
|
return $record->getInlineClassnameField($column, $fieldClasses);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
],
|
||||||
'Title' => function ($record, $column, $grid) {
|
'Title' => [
|
||||||
if ($record instanceof EditableFormField) {
|
'callback' => function ($record, $column, $grid) {
|
||||||
return $record->getInlineTitleField($column);
|
if ($record instanceof EditableFormField) {
|
||||||
|
return $record->getInlineTitleField($column);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$config = GridFieldConfig::create()
|
$config = GridFieldConfig::create()
|
||||||
|
@ -47,7 +47,7 @@ class UserDefinedForm extends Page
|
|||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $icon = 'userforms/images/sitetree_icon.png';
|
private static $icon = 'userforms/client/dist/images/sitetree_icon.png';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user