Merge branch '5.15' into 5

This commit is contained in:
Steve Boyd 2023-05-31 11:20:14 +12:00
commit 1ccb587f6b

View File

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