mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02: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();
|
||||
$fieldClasses = singleton(EditableFormField::class)->getEditableFieldClasses();
|
||||
$editableColumns->setDisplayFields([
|
||||
'ClassName' => function ($record, $column, $grid) use ($fieldClasses) {
|
||||
'ClassName' => [
|
||||
'callback' => function ($record, $column, $grid) use ($fieldClasses) {
|
||||
if ($record instanceof EditableFormField) {
|
||||
return $record->getInlineClassnameField($column, $fieldClasses);
|
||||
}
|
||||
},
|
||||
'Title' => function ($record, $column, $grid) {
|
||||
}
|
||||
],
|
||||
'Title' => [
|
||||
'callback' => function ($record, $column, $grid) {
|
||||
if ($record instanceof EditableFormField) {
|
||||
return $record->getInlineTitleField($column);
|
||||
}
|
||||
}
|
||||
]
|
||||
]);
|
||||
|
||||
$config = GridFieldConfig::create()
|
||||
|
@ -47,7 +47,7 @@ class UserDefinedForm extends Page
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private static $icon = 'userforms/images/sitetree_icon.png';
|
||||
private static $icon = 'userforms/client/dist/images/sitetree_icon.png';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
Loading…
Reference in New Issue
Block a user