From c1f7e0ed48fea3bf21a2e5bad9b9d2c6254b4e09 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 10 May 2012 15:46:54 +1200 Subject: [PATCH] BUGFIX #7298 Fixed incorrect message in GridFieldDetailForm from en.yml language file. --- forms/gridfield/GridFieldDetailForm.php | 12 ++++++------ lang/en.yml | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/forms/gridfield/GridFieldDetailForm.php b/forms/gridfield/GridFieldDetailForm.php index 141a14942..113cd0566 100755 --- a/forms/gridfield/GridFieldDetailForm.php +++ b/forms/gridfield/GridFieldDetailForm.php @@ -266,13 +266,13 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler { $actions = new FieldList(); if($this->record->ID !== 0) { - $actions->push(FormAction::create('doSave', _t('GridFieldDetailsForm.Save', 'Save')) + $actions->push(FormAction::create('doSave', _t('GridFieldDetailForm.Save', 'Save')) ->setUseButtonTag(true)->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept')); - $actions->push(FormAction::create('doDelete', _t('GridFieldDetailsForm.Delete', 'Delete')) + $actions->push(FormAction::create('doDelete', _t('GridFieldDetailForm.Delete', 'Delete')) ->addExtraClass('ss-ui-action-destructive')); }else{ // adding new record //Change the Save label to 'Create' - $actions->push(FormAction::create('doSave', _t('GridFieldDetailsForm.Create', 'Create')) + $actions->push(FormAction::create('doSave', _t('GridFieldDetailForm.Create', 'Create')) ->setUseButtonTag(true)->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'add')); // Add a Cancel link which is a button-like link and link back to one level up. @@ -347,7 +347,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler { // TODO Save this item into the given relationship $message = sprintf( - _t('ComplexTableField.SUCCESSEDIT2', 'Saved %s %s'), + _t('GridFieldDetailForm.Saved', 'Saved %s %s'), $this->record->singular_name(), '"' . htmlspecialchars($this->record->Title, ENT_QUOTES) . '"' ); @@ -361,7 +361,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler { try { $toDelete = $this->record; if (!$toDelete->canDelete()) { - throw new ValidationException(_t('GridFieldDetailsForm.DeletePermissionsFailure',"No delete permissions"),0); + throw new ValidationException(_t('GridFieldDetailForm.DeletePermissionsFailure',"No delete permissions"),0); } $toDelete->delete(); @@ -371,7 +371,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler { } $message = sprintf( - _t('ComplexTableField.SUCCESSEDIT2', 'Deleted %s %s'), + _t('GridFieldDetailForm.Deleted', 'Deleted %s %s'), $this->record->singular_name(), '"' . htmlspecialchars($this->record->Title, ENT_QUOTES) . '"' ); diff --git a/lang/en.yml b/lang/en.yml index c8520f917..246b267ba 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -188,11 +188,13 @@ en: ResetFilter: Reset GridFieldAction_Delete: DeletePermissionsFailure: 'No delete permissions' - GridFieldDetailsForm: + GridFieldDetailForm: Create: Create Delete: Delete DeletePermissionsFailure: 'No delete permissions' Save: Save + Saved: 'Saved %s %s' + Deleted: 'Deleted %s %s' GridFieldItemEditView.ss: 'Go back': 'Go back' Group: