Prevented duplicate IDs on action buttons

This commit is contained in:
Christopher Pitt 2015-11-17 13:12:21 +13:00
parent 4d538f565c
commit 671766364b

View File

@ -44,7 +44,7 @@ class CommentsGridFieldAction implements GridField_ColumnProvider, GridField_Act
if(!$record->IsSpam || !$record->Moderated) { if(!$record->IsSpam || !$record->Moderated) {
$field .= GridField_FormAction::create( $field .= GridField_FormAction::create(
$gridField, $gridField,
'CustomAction' . $record->ID, 'CustomAction' . $record->ID . 'Spam',
'Spam', 'Spam',
'spam', 'spam',
array('RecordID' => $record->ID) array('RecordID' => $record->ID)
@ -54,7 +54,7 @@ class CommentsGridFieldAction implements GridField_ColumnProvider, GridField_Act
if($record->IsSpam || !$record->Moderated) { if($record->IsSpam || !$record->Moderated) {
$field .= GridField_FormAction::create( $field .= GridField_FormAction::create(
$gridField, $gridField,
'CustomAction' . $record->ID, 'CustomAction' . $record->ID . 'Approve',
'Approve', 'Approve',
'approve', 'approve',
array('RecordID' => $record->ID) array('RecordID' => $record->ID)
@ -97,4 +97,4 @@ class CommentsGridFieldAction implements GridField_ColumnProvider, GridField_Act
); );
} }
} }
} }