32 lines
1.5 KiB
Text
32 lines
1.5 KiB
Text
<%= 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 n’apparaî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 %>
|