mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Merge pull request #172 from kinglozzer/dupe-html-ids
FIX: Prevent duplicate HTML IDs when adding new records inline
This commit is contained in:
commit
e62422fdb3
@ -100,6 +100,13 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S
|
||||
));
|
||||
|
||||
$content = $field->Field();
|
||||
|
||||
// Convert HTML IDs built by FormTemplateHelper to the template format
|
||||
$content = str_replace(
|
||||
'GridFieldAddNewInlineButton_o.num_',
|
||||
'GridFieldAddNewInlineButton_{%=o.num%}_',
|
||||
$content
|
||||
);
|
||||
} else {
|
||||
$content = $grid->getColumnContent($record, $column);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user