not remove Submissions, use setTitle

This commit is contained in:
Lukas Erni 2023-04-26 07:26:33 +02:00
parent 0d7f7ed6d0
commit 0b61d1a3bb

View File

@ -189,13 +189,12 @@ trait UserForm
'OnCompleteMessageLabel', 'OnCompleteMessageLabel',
'OnCompleteMessage', 'OnCompleteMessage',
'Fields', 'Fields',
'EmailRecipients', 'EmailRecipients'
'Submissions'
]); ]);
// 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
@ -240,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',