Skip to content

Commit

Permalink
Localization for "cancel" button in GridFieldDetailForm
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Sep 11, 2012
1 parent f49439c commit ea9041d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions forms/gridfield/GridFieldDetailForm.php
Expand Up @@ -302,10 +302,11 @@ function ItemEditForm() {
$curmbs = $this->Breadcrumbs(); $curmbs = $this->Breadcrumbs();
if($curmbs && $curmbs->count()>=2){ if($curmbs && $curmbs->count()>=2){
$one_level_up = $curmbs->offsetGet($curmbs->count()-2); $one_level_up = $curmbs->offsetGet($curmbs->count()-2);
$text = " $text = sprintf(
<a class=\"crumb ss-ui-button ss-ui-action-destructive cms-panel-link ui-corner-all\" href=\"".$one_level_up->Link."\"> "<a class=\"crumb ss-ui-button ss-ui-action-destructive cms-panel-link ui-corner-all\" href=\"%s\">%s</a>",
Cancel $one_level_up->Link,
</a>"; _t('GridFieldDetailForm.CancelBtn', 'Cancel')
);
$actions->push(new LiteralField('cancelbutton', $text)); $actions->push(new LiteralField('cancelbutton', $text));
} }
} }
Expand Down
1 change: 1 addition & 0 deletions lang/en.yml
Expand Up @@ -232,6 +232,7 @@ en:
GridFieldAction_Delete: GridFieldAction_Delete:
DeletePermissionsFailure: 'No delete permissions' DeletePermissionsFailure: 'No delete permissions'
GridFieldDetailForm: GridFieldDetailForm:
CancelBtn: Cancel
Create: Create Create: Create
Delete: Delete Delete: Delete
DeletePermissionsFailure: 'No delete permissions' DeletePermissionsFailure: 'No delete permissions'
Expand Down

0 comments on commit ea9041d

Please sign in to comment.