14 lines
1 KiB
Text
14 lines
1 KiB
Text
= form_for(commentaire, url: form_url, html: { class: 'form', data: { controller: 'persisted-form', persisted_form_key_value: @dossier.present? ? dom_id(@dossier) : dom_id(@procedure, :bulk_message) } }) do |f|
|
|
- dossier = commentaire.dossier
|
|
- placeholder = t('views.shared.dossiers.messages.form.write_message_to_administration_placeholder')
|
|
- if instructeur_signed_in? || administrateur_signed_in? || expert_signed_in?
|
|
- placeholder = t('views.shared.dossiers.messages.form.write_message_placeholder')
|
|
= f.text_area :body, rows: 5, placeholder: placeholder, title: placeholder, required: true, class: 'message-textarea'
|
|
.flex.justify-between.wrap
|
|
- disable_piece_jointe = defined?(disable_piece_jointe) ? disable_piece_jointe : false
|
|
%div
|
|
- if !disable_piece_jointe
|
|
= render Attachment::EditComponent.new(form: f, attached_file: commentaire.piece_jointe)
|
|
|
|
%div
|
|
= f.submit t('views.shared.dossiers.messages.form.send_message'), class: 'button primary send', data: { disable: true }
|