diff --git a/code/Extension/UserFormFieldEditorExtension.php b/code/Extension/UserFormFieldEditorExtension.php index d6cd3fa..060fe3f 100644 --- a/code/Extension/UserFormFieldEditorExtension.php +++ b/code/Extension/UserFormFieldEditorExtension.php @@ -212,11 +212,11 @@ class UserFormFieldEditorExtension extends DataExtension /** * When duplicating a UserDefinedForm, duplicate all of its fields and display rules * - * @see DataObject::duplicate - * @param DataObject $oldPage + * @see \SilverStripe\ORM\DataObject::duplicate + * @param \SilverStripe\ORM\DataObject $oldPage * @param bool $doWrite * @param string $manyMany - * @return DataObject + * @return \SilverStripe\ORM\DataObject */ public function onAfterDuplicate($oldPage, $doWrite, $manyMany) { diff --git a/code/Form/UserForm.php b/code/Form/UserForm.php index 2d15c2a..bc76f8a 100644 --- a/code/Form/UserForm.php +++ b/code/Form/UserForm.php @@ -92,7 +92,7 @@ class UserForm extends Form /** * Return the fieldlist, filtered to only contain steps * - * @return ArrayList + * @return \SilverStripe\ORM\ArrayList */ public function getSteps() { diff --git a/code/Model/EditableCustomRule.php b/code/Model/EditableCustomRule.php index 812031d..59cbd8b 100644 --- a/code/Model/EditableCustomRule.php +++ b/code/Model/EditableCustomRule.php @@ -7,7 +7,6 @@ use SilverStripe\CMS\Controllers\CMSMain; use SilverStripe\Control\Controller; use SilverStripe\Core\Convert; use SilverStripe\ORM\DataObject; -use SilverStripe\UserForms\Model\EditableFormField; use Silverstripe\Versioned\Versioned; /** diff --git a/code/Model/EditableFormField/EditableCountryDropdownField.php b/code/Model/EditableFormField/EditableCountryDropdownField.php index a0ba528..b23f84a 100644 --- a/code/Model/EditableFormField/EditableCountryDropdownField.php +++ b/code/Model/EditableFormField/EditableCountryDropdownField.php @@ -6,7 +6,6 @@ use SilverStripe\Core\Manifest\ModuleLoader; use SilverStripe\Forms\DropdownField; use SilverStripe\i18n\i18n; use SilverStripe\UserForms\Model\EditableCustomRule; -use SilverStripe\UserForms\Model\EditableDropdownField; use SilverStripe\UserForms\Model\EditableFormField; /** @@ -38,8 +37,8 @@ class EditableCountryDropdownField extends EditableFormField { $field = DropdownField::create($this->Name, $this->EscapedTitle) ->setSource(i18n::getData()->getCountries()) - ->setFieldHolderTemplate('UserFormsField_holder') - ->setTemplate(EditableDropdownField::class); + ->setFieldHolderTemplate(EditableFormField::class . '_holder') + ->setTemplate(EditableDropdown::class); $this->doUpdateFormField($field); diff --git a/code/Model/EditableFormField/EditableDropdown.php b/code/Model/EditableFormField/EditableDropdown.php index b30e72f..13ac419 100755 --- a/code/Model/EditableFormField/EditableDropdown.php +++ b/code/Model/EditableFormField/EditableDropdown.php @@ -6,6 +6,7 @@ use SilverStripe\Forms\CheckboxField; use SilverStripe\Forms\DropdownField; use SilverStripe\Forms\TextField; use SilverStripe\UserForms\Model\EditableCustomRule; +use SilverStripe\UserForms\Model\EditableFormField; /** * EditableDropdown diff --git a/code/Model/EditableFormField/EditableFieldGroup.php b/code/Model/EditableFormField/EditableFieldGroup.php index bed5c55..053840e 100644 --- a/code/Model/EditableFormField/EditableFieldGroup.php +++ b/code/Model/EditableFormField/EditableFieldGroup.php @@ -6,7 +6,6 @@ use SilverStripe\Core\Convert; use SilverStripe\Forms\LabelField; use SilverStripe\UserForms\FormField\UserFormsGroupField; use SilverStripe\UserForms\Model\EditableFormField; -use SilverStripe\UserForms\Model\EditableFormField\EditableFieldGroupEnd; /** * Specifies that this ends a group of fields diff --git a/code/Model/EditableFormField/EditableLiteralField.php b/code/Model/EditableFormField/EditableLiteralField.php index 05c4c8d..b3f9033 100644 --- a/code/Model/EditableFormField/EditableLiteralField.php +++ b/code/Model/EditableFormField/EditableLiteralField.php @@ -144,7 +144,7 @@ class EditableLiteralField extends EditableFormField $field = CompositeField::create($content) ->setName($this->Name) - // ->setID($this->Name) // @todo + // ->setID($this->Name) // @todo: https://github.com/silverstripe/silverstripe-framework/issues/7264 ->setFieldHolderTemplate(__CLASS__ . '_holder'); $this->doUpdateFormField($field); diff --git a/code/Model/EditableFormField/EditableMultipleOptionField.php b/code/Model/EditableFormField/EditableMultipleOptionField.php index 2f5983f..6b8aeb9 100644 --- a/code/Model/EditableFormField/EditableMultipleOptionField.php +++ b/code/Model/EditableFormField/EditableMultipleOptionField.php @@ -12,7 +12,6 @@ use SilverStripe\Forms\GridField\GridFieldToolbarHeader; use SilverStripe\Forms\Tab; use SilverStripe\ORM\Map; use SilverStripe\UserForms\Model\EditableFormField; -use SilverStripe\UserForms\Model\EditableFormField\EditableOption; use SilverStripe\Versioned\Versioned; use Symbiote\GridFieldExtensions\GridFieldAddNewInlineButton; use Symbiote\GridFieldExtensions\GridFieldEditableColumns; @@ -57,7 +56,7 @@ class EditableMultipleOptionField extends EditableFormField private static $table_name = 'EditableMultipleOptionField'; /** - * @return FieldList + * @return \SilverStripe\Forms\FieldList */ public function getCMSFields() { @@ -133,7 +132,7 @@ class EditableMultipleOptionField extends EditableFormField /** * Return whether or not this field has addable options such as a - * {@link EditableDropdownField} or {@link EditableRadioField} + * {@link EditableDropdown} or {@link EditableRadioField} * * @return bool */ @@ -160,7 +159,7 @@ class EditableMultipleOptionField extends EditableFormField /** * Returns all default options * - * @return SS_List + * @return \SilverStripe\ORM\SS_List */ protected function getDefaultOptions() { diff --git a/code/Model/Recipient/UserFormRecipientItemRequest.php b/code/Model/Recipient/UserFormRecipientItemRequest.php index dc07400..255b7e6 100644 --- a/code/Model/Recipient/UserFormRecipientItemRequest.php +++ b/code/Model/Recipient/UserFormRecipientItemRequest.php @@ -54,10 +54,13 @@ class UserFormRecipientItemRequest extends GridFieldDetailForm_ItemRequest { $data = ArrayList::create(); - $fields = $this->record->Form()->Fields()->filter([ - 'ClassName:not' => EditableLiteralField::class, - 'ClassName:not' => EditableFormHeading::class - ]); + $fields = $this->record->Form()->Fields()->filter( + 'ClassName:not', + [ + EditableLiteralField::class, + EditableFormHeading::class, + ] + ); foreach ($fields as $field) { $data->push(ArrayData::create([ diff --git a/code/Model/UserDefinedForm.php b/code/Model/UserDefinedForm.php index 2f696e6..c16aa59 100755 --- a/code/Model/UserDefinedForm.php +++ b/code/Model/UserDefinedForm.php @@ -36,7 +36,6 @@ use SilverStripe\UserForms\Form\UserFormsGridFieldFilterHeader; use SilverStripe\UserForms\Model\Recipient\EmailRecipient; use SilverStripe\UserForms\Model\Recipient\UserFormRecipientItemRequest; use SilverStripe\UserForms\Model\Submission\SubmittedForm; -use SilverStripe\UserForms\Task\UserFormsUpgradeService; use SilverStripe\View\Requirements; /** diff --git a/code/Model/UserDefinedFormController.php b/code/Model/UserDefinedFormController.php index 4aae91d..eed8955 100644 --- a/code/Model/UserDefinedFormController.php +++ b/code/Model/UserDefinedFormController.php @@ -142,7 +142,7 @@ class UserDefinedFormController extends PageController * Get the form for the page. Form can be modified by calling {@link updateForm()} * on a UserDefinedForm extension. * - * @return Forms + * @return Form */ public function Form() { @@ -198,7 +198,7 @@ JS * @param array $data * @param Form $form * - * @return Redirection + * @return \SilverStripe\Control\HTTPResponse */ public function process($data, $form) { @@ -400,7 +400,7 @@ JS /** * Allows the use of field values in email body. * - * @param ArrayList fields + * @param ArrayList $fields * @return ArrayData */ protected function getMergeFieldsMap($fields = [])