Merge pull request #172 from kinglozzer/dupe-html-ids

FIX: Prevent duplicate HTML IDs when adding new records inline
This commit is contained in:
Marcus 2017-01-30 12:05:03 +11:00 committed by GitHub
commit e62422fdb3

View File

@ -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);