demarches-normaliennes/app/views/invites/_form.html.haml

31 lines
1.3 KiB
Text

#invites-form
- if invites.present?
#invite-list{ morphing ? { tabindex: "-1" } : {} }
%h4= t('views.invites.form.invite_to_participate')
%ul
- invites.each do |invite|
%li
= invite.email
%small{ 'data-turbo': 'true' }
= link_to t('views.invites.form.withdraw_permission'), invite_path(invite), data: { turbo_method: :delete, turbo_confirm: t('views.invites.form.want_to_withdraw_permission') }
%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), data: { turbo: true, turbo_force: 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: 'fr-btn fr-btn--secondary'