demarches/app/views/letters/_form.html.erb

32 lines
1.5 KiB
Text
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%= form_with(model: letter, local: true, class: 'mam', multipart: true) do |form| %>
<%= form_group_for form, :title, label: false do %>
<%= form.label :title, 'Titre de votre lettre', class: %i[form-label required] %>
<%= form.text_field :title, class: %i[form-control], required: true %>
<% end %>
<%= form_group_for form, :document, label: false do %>
<%= form.label :document, 'Votre lettre au format PDF', class: %i[form-label] %>
<%= form.file_field :document, class: %i[form-control] %>
<% end %>
<%= form_group_for form, :author, label: false do %>
<%= form.label :author, 'Qui êtes-vous ?', class: %i[form-label required] %>
<%= form.text_field :author, class: %i[form-control], required: true %>
<% end %>
<%= form_group_for form, :email, label: false do %>
<%= form.label :email, 'Quelle est votre adresse courriel ?', class: %i[form-label required] %>
<%= form.email_field :email, class: %i[form-control], required: true %>
<% end %>
<%= form_group_for form, :private_email, label: false do %>
<%= form.label :private_email, 'Voulez-vous que votre adresse email soit privée ? Si oui, elle napparaîtra pas sur nos pages.', class: %i[form-label required] %>
<%= form.select :private_email, options_for_select(
[false, true].collect { |n| [(n) ? 'Oui' : 'Non', n] }, form.object.private_email
), {}, class: %i[form-control form-select] %>
<% end %>
<div class="mt-4 text-end">
<%= form.submit 'Déposer ma lettre ouverte', class: %i[btn btn-dark] %>
</div>
<% end %>