2021-08-20 11:16:41 +02:00
|
|
|
= form_for(commentaire, url: form_url, html: { class: 'form', data: { persisted_content_id: @dossier.present? ? @dossier.id : "bulk-message-#{@procedure.id}" } }) do |f|
|
2021-08-11 19:02:12 +02:00
|
|
|
- dossier = commentaire.dossier
|
2021-04-17 18:49:00 +02:00
|
|
|
- placeholder = t('views.shared.dossiers.messages.form.write_message_to_administration_placeholder')
|
2019-09-05 16:47:25 +02:00
|
|
|
- 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-12-21 11:36:47 +01:00
|
|
|
= f.text_area :body, rows: 5, placeholder: placeholder, title: placeholder, required: true, class: 'message-textarea persisted-input'
|
2019-01-07 16:04:48 +01:00
|
|
|
.flex.justify-between.wrap
|
2021-10-27 11:22:03 +02:00
|
|
|
- disable_piece_jointe = defined?(disable_piece_jointe) ? disable_piece_jointe : false
|
2017-11-28 11:37:42 +01:00
|
|
|
%div
|
2021-10-27 11:22:03 +02:00
|
|
|
- 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
|
2017-11-28 11:37:42 +01:00
|
|
|
|
2018-09-04 18:25:55 +02:00
|
|
|
%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 }
|