Merge pull request #318 from unclecheese/patch-1

BUGFIX: Dropdowns do not use unique IDs
This commit is contained in:
Christopher Pitt 2015-11-17 11:52:48 +13:00
commit 3f23add5af

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
}
}
}
}
}