NEW Allow translation of tab names (#384)

Tab names in the CMS can now be translated
This commit is contained in:
rasstislav 2016-04-08 17:45:10 +02:00 committed by Daniel Hensby
parent 8fa377ed65
commit 4e8e919c42

View File

@ -197,6 +197,8 @@ class UserDefinedForm_EmailRecipient extends DataObject {
)) ))
)); ));
$fields->fieldByName('Root.EmailDetails')->setTitle(_t('UserDefinedForm_EmailRecipient.EMAILDETAILSTAB', 'Email Details'));
// Only show the preview link if the recipient has been saved. // Only show the preview link if the recipient has been saved.
if (!empty($this->EmailTemplate)) { if (!empty($this->EmailTemplate)) {
$preview = sprintf( $preview = sprintf(
@ -237,6 +239,8 @@ class UserDefinedForm_EmailRecipient extends DataObject {
) )
)); ));
$fields->fieldByName('Root.EmailContent')->setTitle(_t('UserDefinedForm_EmailRecipient.EMAILCONTENTTAB', 'Email Content'));
// Custom rules for sending this field // Custom rules for sending this field
$grid = new GridField( $grid = new GridField(
"CustomRules", "CustomRules",
@ -260,6 +264,8 @@ class UserDefinedForm_EmailRecipient extends DataObject {
$grid $grid
)); ));
$fields->fieldByName('Root.CustomRules')->setTitle(_t('UserDefinedForm_EmailRecipient.CUSTOMRULESTAB', 'Custom Rules'));
$this->extend('updateCMSFields', $fields); $this->extend('updateCMSFields', $fields);
return $fields; return $fields;
} }