Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Localization for "cancel" button in GridFieldDetailForm

  • Loading branch information...
commit ea9041df5456b3894e5a414f94a60fb3c9e98eb5 1 parent f49439c
@chillu chillu authored
Showing with 6 additions and 4 deletions.
  1. +5 −4 forms/gridfield/GridFieldDetailForm.php
  2. +1 −0  lang/en.yml
View
9 forms/gridfield/GridFieldDetailForm.php
@@ -302,10 +302,11 @@ function ItemEditForm() {
$curmbs = $this->Breadcrumbs();
if($curmbs && $curmbs->count()>=2){
$one_level_up = $curmbs->offsetGet($curmbs->count()-2);
- $text = "
- <a class=\"crumb ss-ui-button ss-ui-action-destructive cms-panel-link ui-corner-all\" href=\"".$one_level_up->Link."\">
- Cancel
- </a>";
+ $text = sprintf(
+ "<a class=\"crumb ss-ui-button ss-ui-action-destructive cms-panel-link ui-corner-all\" href=\"%s\">%s</a>",
+ $one_level_up->Link,
+ _t('GridFieldDetailForm.CancelBtn', 'Cancel')
+ );
$actions->push(new LiteralField('cancelbutton', $text));
}
}
View
1  lang/en.yml
@@ -232,6 +232,7 @@ en:
GridFieldAction_Delete:
DeletePermissionsFailure: 'No delete permissions'
GridFieldDetailForm:
+ CancelBtn: Cancel
Create: Create
Delete: Delete
DeletePermissionsFailure: 'No delete permissions'
Please sign in to comment.
Something went wrong with that request. Please try again.