mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Merge pull request #214 from open-sausages/pulls/2.0/better-casting
BUG Fix casting for ‘$Attributes’
This commit is contained in:
commit
39dddc4c91
@ -144,8 +144,10 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S
|
||||
sprintf('[%s][{%%=o.num%%}]', self::POST_KEY),
|
||||
$content
|
||||
);
|
||||
}
|
||||
|
||||
// Cast content as HTML
|
||||
// Cast content
|
||||
if (! $content instanceof DBField) {
|
||||
$content = DBField::create_field('HTMLFragment', $content);
|
||||
}
|
||||
|
||||
@ -157,7 +159,7 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S
|
||||
|
||||
$columns->push(new ArrayData(array(
|
||||
'Content' => $content,
|
||||
'Attributes' => $attrs,
|
||||
'Attributes' => DBField::create_field('HTMLFragment', $attrs),
|
||||
'IsActions' => $column == 'Actions'
|
||||
)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user