FIX: Prevent duplicate HTML IDs when adding new records inline

This commit is contained in:
Loz Calver 2016-11-30 15:47:24 +00:00
parent ba758e7cc9
commit cbdb7d4729

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