mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
FIX Pass arrays to addFieldsToTab
This commit is contained in:
parent
179d1451e6
commit
796fffec4f
@ -318,14 +318,14 @@ class EditableFormField extends DataObject
|
||||
// Validation
|
||||
$validationFields = $this->getFieldValidationOptions();
|
||||
if ($validationFields && $validationFields->count()) {
|
||||
$fields->addFieldsToTab('Root.Validation', $validationFields);
|
||||
$fields->addFieldsToTab('Root.Validation', $validationFields->toArray());
|
||||
$fields->fieldByName('Root.Validation')->setTitle(_t(__CLASS__.'.VALIDATION', 'Validation'));
|
||||
}
|
||||
|
||||
// Add display rule fields
|
||||
$displayFields = $this->getDisplayRuleFields();
|
||||
if ($displayFields && $displayFields->count()) {
|
||||
$fields->addFieldsToTab('Root.DisplayRules', $displayFields);
|
||||
$fields->addFieldsToTab('Root.DisplayRules', $displayFields->toArray());
|
||||
}
|
||||
|
||||
// Placeholder
|
||||
|
@ -234,9 +234,9 @@ trait UserForm
|
||||
->getComponentByType(GridFieldDetailForm::class)
|
||||
->setItemRequestClass(UserFormRecipientItemRequest::class);
|
||||
|
||||
$fields->addFieldsToTab('Root.FormOptions', $onCompleteFieldSet);
|
||||
$fields->addFieldToTab('Root.FormOptions', $onCompleteFieldSet);
|
||||
$fields->addFieldToTab('Root.Recipients', $emailRecipients);
|
||||
$fields->addFieldsToTab('Root.FormOptions', $this->getFormOptions());
|
||||
$fields->addFieldsToTab('Root.FormOptions', $this->getFormOptions()->toArray());
|
||||
|
||||
$submissions = $this->getSubmissionsGridField();
|
||||
$fields->findOrMakeTab('Root.Submissions')->setTitle(_t('SilverStripe\\UserForms\\Model\\UserDefinedForm.SUBMISSIONS', 'Submissions'));
|
||||
|
Loading…
Reference in New Issue
Block a user