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