imports:
  - { resource: "./Partials/GridRow.yaml" }
TYPO3:
  CMS:
    Form:
      persistenceManager:
        allowedExtensionPaths:
          99: EXT:drk_template/Resources/Private/Forms/
        allowSaveToExtensionPaths: false
        allowDeleteFromExtensionPaths: false

      prototypes:
        drkform:
          __inheritances:
            10: 'TYPO3.CMS.Form.prototypes.standard'
          formElementsDefinition:
            Form:
              renderingOptions:
                partialRootPaths:
                  999: 'EXT:drk_template/Resources/Private/Partials/Form/'
                templateRootPaths:
                  999: 'EXT:drk_template/Resources/Private/Templates/Form/'
                honeypot:
                  enable: true
                additionalAttributes:
                  class: 'o-form c-form'
            GridRow:
              properties:
                elementClassAttribute: ''
            ### FORM ELEMENTS: INPUT ###
            Text:
              properties:
                elementClassAttribute: 'o-form__field o-form__field--text'
                elementErrorClassAttribute: 'parsley-error'

            Password:
              properties:
                elementClassAttribute: 'o-form__field o-form__field--text'
                elementErrorClassAttribute: 'parsley-error'

            Textarea:
              properties:
                elementClassAttribute: 'o-form__field o-form__field--textarea'

            ### FORM ELEMENTS: HTML5 ###
            Email:
              properties:
                elementClassAttribute: 'o-form__field o-form__field--text'
                elementErrorClassAttribute: 'parsley-error'
              validators:
                -
                  identifier: EmailAddress

            Telephone:
              properties:
                elementClassAttribute: 'o-form__field o-form__field--text'
                elementErrorClassAttribute: 'parsley-error'
              validators:
                -
                  identifier: RegularExpression
                  options:
                    regularExpression: '/^.*$/'

            Url:
              properties:
                elementClassAttribute: 'o-form__field o-form__field--text'
                elementErrorClassAttribute: 'parsley-error'
              validators:
                -
                  identifier: RegularExpression
                  options:
                    regularExpression: '/^.*$/'

            Number:
              properties:
                elementClassAttribute: 'o-form__field o-form__field--text'
                elementErrorClassAttribute: 'parsley-error'
              validators:
                -
                  identifier: Number

            Date:
              properties:
                elementClassAttribute: 'o-form__field o-form__field--date'
                elementErrorClassAttribute: 'parsley-error'

            ### FORM ELEMENTS: SELECT ###
            Checkbox:
              properties:
                elementClassAttribute: 'o-check-group__option'
                containerClassAttribute: 'o-check-group'
                value: 1

            MultiCheckbox:
              properties:
                elementClassAttribute: 'o-check-group__option'
                containerClassAttribute: 'o-check-group'

            MultiSelect:
              properties:
                elementClassAttribute: 'xlarge'

            RadioButton:
              properties:
                elementClassAttribute: 'o-radio-group__option'
                containerClassAttribute: 'o-radio-group'

            SingleSelect:
              __inheritances:
                10: 'TYPO3.CMS.Form.mixins.formElementMixins.SingleSelectionMixin'
      mixins:
        formElementMixins:
          # provide now deprecated mixins: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/10.2/Deprecation-89742-FormMixins.html
          SingleSelectionMixin:
            formEditor:
              editors:
                100:
                  identifier: header
                  templateName: Inspector-FormElementHeaderEditor
                200:
                  identifier: label
                  templateName: Inspector-TextEditor
                  label: formEditor.elements.FormElement.editor.label.label
                  propertyPath: label
                230:
                  identifier: elementDescription
                  templateName: Inspector-TextEditor
                  label: formEditor.elements.FormElement.editor.elementDescription.label
                  propertyPath: properties.elementDescription
                300:
                  identifier: options
                  templateName: Inspector-PropertyGridEditor
                  label: formEditor.elements.SelectionMixin.editor.options.label
                  propertyPath: properties.options
                  propertyValidators:
                    10: NotEmpty
                  isSortable: true
                  enableAddRow: true
                  enableDeleteRow: true
                  removeLastAvailableRowFlashMessageTitle: formEditor.elements.SelectionMixin.editor.options.removeLastAvailableRowFlashMessageTitle
                  removeLastAvailableRowFlashMessageMessage: formEditor.elements.SelectionMixin.editor.options.removeLastAvailableRowFlashMessageMessage
                  shouldShowPreselectedValueColumn: single
                  multiSelection: false
                700:
                  identifier: gridColumnViewPortConfiguration
                  templateName: Inspector-GridColumnViewPortConfigurationEditor
                  label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.label
                  configurationOptions:
                    viewPorts:
                      10:
                        viewPortIdentifier: xs
                        label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.xs.label
                      20:
                        viewPortIdentifier: sm
                        label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.sm.label
                      30:
                        viewPortIdentifier: md
                        label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.md.label
                      40:
                        viewPortIdentifier: lg
                        label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.lg.label
                    numbersOfColumnsToUse:
                      label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.numbersOfColumnsToUse.label
                      propertyPath: 'properties.gridColumnClassAutoConfiguration.viewPorts.{@viewPortIdentifier}.numbersOfColumnsToUse'
                      fieldExplanationText: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.numbersOfColumnsToUse.fieldExplanationText
                800:
                  identifier: requiredValidator
                  templateName: Inspector-RequiredValidatorEditor
                  label: formEditor.elements.FormElement.editor.requiredValidator.label
                  validatorIdentifier: NotEmpty
                  propertyPath: properties.fluidAdditionalAttributes.required
                  propertyValue: required
                  configurationOptions:
                    validationErrorMessage:
                      label: formEditor.elements.FormElement.editor.requiredValidator.validationErrorMessage.label
                      propertyPath: properties.validationErrorMessages
                      fieldExplanationText: formEditor.elements.FormElement.editor.requiredValidator.validationErrorMessage.fieldExplanationText
                      errorCodes:
                        10: 1221560910
                        20: 1221560718
                        30: 1347992400
                        40: 1347992453
                9999:
                  identifier: removeButton
                  templateName: Inspector-RemoveElementEditor
              predefinedDefaults:
                properties:
                  options: {  }
            implementationClassName: TYPO3\CMS\Form\Domain\Model\FormElements\GenericFormElement
            properties:
              containerClassAttribute: input
              elementClassAttribute: ''
              elementErrorClassAttribute: error
