demarches-normaliennes/app/views/shared/dossiers/messages/_form.html.haml

18 lines
1.1 KiB
Text
Raw Normal View History

= form_for(commentaire, url: form_url, html: { class: 'form', data: { persisted_content_id: @dossier.present? ? @dossier.id : "bulk-message-#{@procedure.id}" } }) do |f|
- dossier = commentaire.dossier
2021-04-17 18:49:00 +02:00
- placeholder = t('views.shared.dossiers.messages.form.write_message_to_administration_placeholder')
- if instructeur_signed_in? || administrateur_signed_in?
2021-04-17 18:49:00 +02:00
- placeholder = t('views.shared.dossiers.messages.form.write_message_placeholder')
2021-08-17 11:11:01 +02:00
= f.text_area :body, rows: 5, placeholder: placeholder, required: true, class: 'message-textarea persisted-input'
.flex.justify-between.wrap
- disable_piece_jointe = defined?(disable_piece_jointe) ? disable_piece_jointe : false
%div
- if !disable_piece_jointe
= f.label :piece_jointe, for: :piece_jointe do
= t('views.shared.dossiers.messages.form.attach_dossier')
%span.notice= t('views.shared.dossiers.messages.form.attachment_size')
= f.file_field :piece_jointe, id: 'piece_jointe', direct_upload: true
%div
2021-04-17 18:49:00 +02:00
= f.submit t('views.shared.dossiers.messages.form.send_message'), class: 'button primary send', data: { disable: true }