diff --git a/forms/gridfield/GridFieldDeleteAction.php b/forms/gridfield/GridFieldDeleteAction.php index cba6b1327..9373a27aa 100644 --- a/forms/gridfield/GridFieldDeleteAction.php +++ b/forms/gridfield/GridFieldDeleteAction.php @@ -107,7 +107,7 @@ class GridFieldDeleteAction implements GridField_ColumnProvider, GridField_Actio if($this->removeRelation) { if(!$record->canEdit()) return; - $field = GridField_FormAction::create($gridField, 'UnlinkRelation'.$record->ID, false, + $field = GridField_FormAction::create($gridField, 'UnlinkRelation'.$record->ID, _t('GridAction.UnlinkRelation', "Unlink"), "unlinkrelation", array('RecordID' => $record->ID)) ->addExtraClass('gridfield-button-unlink') ->setAttribute('title', _t('GridAction.UnlinkRelation', "Unlink")) @@ -115,13 +115,14 @@ class GridFieldDeleteAction implements GridField_ColumnProvider, GridField_Actio } else { if(!$record->canDelete()) return; - $field = GridField_FormAction::create($gridField, 'DeleteRecord'.$record->ID, false, "deleterecord", + $field = GridField_FormAction::create($gridField, 'DeleteRecord'.$record->ID, _t('GridAction.Delete', "Delete"), "deleterecord", array('RecordID' => $record->ID)) ->addExtraClass('gridfield-button-delete') ->setAttribute('title', _t('GridAction.Delete', "Delete")) ->setAttribute('data-icon', 'cross-circle') ->setDescription(_t('GridAction.DELETE_DESCRIPTION','Delete')); } + return $field->Field(); }