identifier: Contact
label: 'Formulaire de Contact'
prototypeName: standard
type: Form

renderingOptions:
  submitButtonLabel: Envoyer

finishers:
  -
    identifier: EmailToReceiver
    options:
      subject: 'Demande d''information'
      recipientAddress:
      recipientName: ''
      senderAddress: ne_pas_repondre@opentalent.fr
      senderName: ''
      replyToAddress: ''
      carbonCopyAddress: ''
      blindCarbonCopyAddress: ''
      format: html
      attachUploads: 'true'
      translation:
        language: ''
  -
    identifier: EmailToSender
    options:
      subject: 'Bonjour / Nous avons pris en compte votre demande.'
      recipientAddress: '{mail}'
      recipientName: '{first-name} {last-name}'
      senderAddress: ne_pas_repondre@opentalent.fr
      senderName: ''
      replyToAddress: ''
      carbonCopyAddress: ''
      blindCarbonCopyAddress: ''
      format: html
      attachUploads: 'false'
  -
    identifier: Confirmation
    options:
      message: 'Votre message a bien été envoyé'
      contentElementUid: ''

renderables:
  -
    identifier: page-1
    label: 'Écrivez-nous:'
    type: Page

    renderingOptions:
      previousButtonLabel: 'Précédent'
      nextButtonLabel: 'Suivant'

    renderables:
      -
        type: StaticText
        identifier: notice
        properties:
          text: 'Note: Les champs marqués d''une astérisque (*) sont obligatoires'
          elementClassAttribute: 'contact-form-info'
        label: ''
      -
        type: GridRow
        identifier: row1
        label: ''
        renderables:
          -
            identifier: last-name
            label: 'Nom'
            type: Text
            defaultValue: ''
            properties:
              fluidAdditionalAttributes:
                required: required
            validators:
              - identifier: NotEmpty

          -
            identifier: first-name
            label: 'Prénom'
            type: Text
            defaultValue: ''
            properties:
              fluidAdditionalAttributes:
                required: required
            validators:
              -
                identifier: NotEmpty

      -
        identifier: mail
        label: 'Adresse email'
        type: Text
        defaultValue: ''
        properties:
          fluidAdditionalAttributes:
            required: required
        validators:
          -
            identifier: EmailAddress
          -
            identifier: NotEmpty

      -
        type: GridRow
        identifier: row2
        label: ''
        renderables:

          -
            identifier: postal-code
            label: 'Code postal'
            type: Text
            defaultValue: ''
            validators:
              -
                identifier: Integer

          -
            identifier: city
            label: 'Ville'
            type: Text
            defaultValue: ''

          -
            identifier: phone
            label: 'Téléphone'
            type: Text
            defaultValue: ''
      -
        identifier: subject
        label: 'Objet'
        type: Text
        defaultValue: ''
        properties:
          fluidAdditionalAttributes:
            required: required
        validators:
          -
            identifier: NotEmpty
      -
        identifier: message
        label: 'Message'
        type: Textarea
        defaultValue: ''
        properties:
          fluidAdditionalAttributes:
            placeholder: 'Votre message ici...'
            required: required
        validators:
          -
            identifier: NotEmpty
