Permalink
Browse files

BUGFIX #7298 Fixed incorrect message in GridFieldDetailForm from en.y…

…ml language file.
  • Loading branch information...
1 parent 138ba0c commit c1f7e0ed48fea3bf21a2e5bad9b9d2c6254b4e09 @halkyon halkyon committed May 10, 2012
Showing with 9 additions and 7 deletions.
  1. +6 −6 forms/gridfield/GridFieldDetailForm.php
  2. +3 −1 lang/en.yml
@@ -266,13 +266,13 @@ function ItemEditForm() {
$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 @@ function doSave($data, $form) {
// 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(),
'<a href="' . $this->Link('edit') . '">"' . htmlspecialchars($this->record->Title, ENT_QUOTES) . '"</a>'
);
@@ -361,7 +361,7 @@ function doDelete($data, $form) {
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 @@ function doDelete($data, $form) {
}
$message = sprintf(
- _t('ComplexTableField.SUCCESSEDIT2', 'Deleted %s %s'),
+ _t('GridFieldDetailForm.Deleted', 'Deleted %s %s'),
$this->record->singular_name(),
'<a href="' . $this->Link('edit') . '">"' . htmlspecialchars($this->record->Title, ENT_QUOTES) . '"</a>'
);
View
@@ -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:

0 comments on commit c1f7e0e

Please sign in to comment.