demarches-normaliennes/app/views/invites/_form.html.haml
2021-07-20 14:18:20 +02:00

28 lines
1.2 KiB
Text

#invites-form
- if dossier.invites.present?
%h4= t('views.invites.form.invite_to_participate')
%ul
- dossier.invites.each do |invite|
%li
= invite.email
%small= link_to(t('views.invites.form.withdraw_permission'), invite_path(invite), data: { confirm: t('views.invites.form.want_to_withdraw_permission') }, method: :delete, remote: true)
%p= t('views.invites.form.edit_dossier')
- if dossier.brouillon?
%p= t('views.invites.form.submit_dossier_yourself')
- else
%p= t('views.invites.form.invite_to_edit_line1')
%p= t('views.invites.form.invite_to_edit_line2')
= form_tag dossier_invites_path(dossier), remote: true, method: :post, class: 'form' do
.row
.col
%span
= label_tag :invite_email, t('views.invites.form.email')
= email_field_tag :invite_email, '', class: 'small', placeholder: t('views.invites.form.email'), required: true
.col
%span
= label_tag :invite_message, t('views.invites.form.invite_message')
= text_area_tag :invite_message, '', class: 'small', placeholder: t('views.invites.form.invite_message')
.col
= submit_tag t('views.invites.form.send_invitation'), class: 'button accepted'