Merge pull request #1206 from lerni/translatable-submission-tab

Submission tab translatable
This commit is contained in:
Sabina Talipova 2023-04-28 10:56:53 +12:00 committed by GitHub
commit 1001989a21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,14 +185,16 @@ trait UserForm
$this->beforeUpdateCMSFields(function ($fields) { $this->beforeUpdateCMSFields(function ($fields) {
// remove // remove
$fields->removeByName('OnCompleteMessageLabel'); $fields->removeByName([
$fields->removeByName('OnCompleteMessage'); 'OnCompleteMessageLabel',
$fields->removeByName('Fields'); 'OnCompleteMessage',
$fields->removeByName('EmailRecipients'); 'Fields',
'EmailRecipients'
]);
// define tabs // define tabs
$fields->findOrMakeTab('Root.FormOptions', _t('SilverStripe\\UserForms\\Model\\UserDefinedForm.CONFIGURATION', 'Configuration')); $fields->findOrMakeTab('Root.FormOptions')->setTitle(_t('SilverStripe\\UserForms\\Model\\UserDefinedForm.CONFIGURATION', 'Configuration'));
$fields->findOrMakeTab('Root.Recipients', _t('SilverStripe\\UserForms\\Model\\UserDefinedForm.RECIPIENTS', 'Recipients')); $fields->findOrMakeTab('Root.Recipients')->setTitle(_t('SilverStripe\\UserForms\\Model\\UserDefinedForm.RECIPIENTS', 'Recipients'));
// text to show on complete // text to show on complete
@ -237,7 +239,7 @@ trait UserForm
$fields->addFieldsToTab('Root.FormOptions', $this->getFormOptions()); $fields->addFieldsToTab('Root.FormOptions', $this->getFormOptions());
$submissions = $this->getSubmissionsGridField(); $submissions = $this->getSubmissionsGridField();
$fields->findOrMakeTab('Root.Submissions', _t('SilverStripe\\UserForms\\Model\\UserDefinedForm.SUBMISSIONS', 'Submissions')); $fields->findOrMakeTab('Root.Submissions')->setTitle(_t('SilverStripe\\UserForms\\Model\\UserDefinedForm.SUBMISSIONS', 'Submissions'));
$fields->addFieldToTab('Root.Submissions', $submissions); $fields->addFieldToTab('Root.Submissions', $submissions);
$fields->addFieldToTab( $fields->addFieldToTab(
'Root.FormOptions', 'Root.FormOptions',