mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #318 from unclecheese/patch-1
BUGFIX: Dropdowns do not use unique IDs
This commit is contained in:
commit
3f23add5af
@ -66,7 +66,7 @@ class GridFieldMergeAction implements GridField_ColumnProvider, GridField_Action
|
|||||||
public function getColumnContent($gridField, $record, $columnName) {
|
public function getColumnContent($gridField, $record, $columnName) {
|
||||||
if($columnName === 'MergeAction' && $record->{$this->childMethod}()->Count() > 0) {
|
if($columnName === 'MergeAction' && $record->{$this->childMethod}()->Count() > 0) {
|
||||||
$dropdown = new DropdownField('Target', 'Target', $this->records->exclude('ID', $record->ID)->map());
|
$dropdown = new DropdownField('Target', 'Target', $this->records->exclude('ID', $record->ID)->map());
|
||||||
|
$dropdown->setAttribute('id', 'Target_'.$record->ID);
|
||||||
$prefix = strtolower($this->parentMethod . '-' . $this->childMethod);
|
$prefix = strtolower($this->parentMethod . '-' . $this->childMethod);
|
||||||
|
|
||||||
$action = GridFieldFormAction::create(
|
$action = GridFieldFormAction::create(
|
||||||
@ -137,4 +137,4 @@ class GridFieldMergeAction implements GridField_ColumnProvider, GridField_Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user