BUGFIX: Dropdowns do not use unique IDs

Solves problem where `DOMXPath` was throwing (in `ShortcodeParser`) due to invalid HTML
This commit is contained in:
unclecheese 2015-11-05 12:02:00 +13:00
parent a87e0f77e6
commit 454d31910a
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ class GridFieldMergeAction implements GridField_ColumnProvider, GridField_Action
public function getColumnContent($gridField, $record, $columnName) {
if($columnName === 'MergeAction' && $record->{$this->childMethod}()->Count() > 0) {
$dropdown = new DropdownField('Target', 'Target', $this->records->exclude('ID', $record->ID)->map());
$dropdown->setAttribute('id', 'Target_'.$record->ID);
$prefix = strtolower($this->parentMethod . '-' . $this->childMethod);
$action = GridFieldFormAction::create(
@ -137,4 +137,4 @@ class GridFieldMergeAction implements GridField_ColumnProvider, GridField_Action
}
}
}
}
}