2023-03-31 16:10:47 +02:00
|
|
|
= render NestedForms::FormOwnerComponent.new
|
2022-11-17 19:18:58 +01:00
|
|
|
= form_for(commentaire, url: form_url, html: { class: 'form', multipart: true, data: { controller: 'persisted-form', persisted_form_key_value: @dossier.present? ? dom_id(@dossier) : dom_id(@procedure, :bulk_message) } }) 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')
|
2022-03-30 10:54:21 +02:00
|
|
|
- if instructeur_signed_in? || administrateur_signed_in? || expert_signed_in?
|
2021-04-17 18:49:00 +02:00
|
|
|
- placeholder = t('views.shared.dossiers.messages.form.write_message_placeholder')
|
2023-01-24 16:31:46 +01:00
|
|
|
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
|
|
|
|
.fr-input-group
|
|
|
|
= label_tag :commentaire_body, class: 'fr-label' do
|
|
|
|
= t('message', scope: [:utils])
|
|
|
|
%span.mandatory *
|
|
|
|
= f.text_area :body, rows: 5, placeholder: placeholder, title: placeholder, required: true, class: 'fr-input message-textarea'
|
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
|
2022-11-17 19:18:58 +01:00
|
|
|
= render Attachment::EditComponent.new(attached_file: commentaire.piece_jointe)
|
2017-11-28 11:37:42 +01:00
|
|
|
|
2023-01-24 16:31:46 +01:00
|
|
|
.send-wrapper.fr-my-3w
|
|
|
|
= f.submit t('views.shared.dossiers.messages.form.send_message'), class: 'fr-btn send', data: { disable: true }
|