17 lines
1.2 KiB
Text
17 lines
1.2 KiB
Text
= render NestedForms::FormOwnerComponent.new
|
|
= form_for(commentaire, url: form_url, html: { multipart: true, data: { controller: 'persisted-form', persisted_form_key_value: dom_id(@dossier) } }) 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')
|
|
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
|
|
|
|
= render Dsfr::InputComponent.new(form: f, attribute: :body, input_type: :text_area, opts: { rows: 5, placeholder: placeholder, title: placeholder, class: 'fr-input message-textarea'})
|
|
|
|
.fr-mt-3w{ data: { controller: "file-input-reset" } }
|
|
= render Attachment::EditComponent.new(attached_file: commentaire.piece_jointe)
|
|
%button.hidden.fr-btn.fr-btn--tertiary-no-outline.fr-btn--icon-left.fr-icon-delete-line{ data: { 'file-input-reset-target': 'reset', action: 'file-input-reset#reset' } }
|
|
= t('views.shared.messages.remove_file')
|
|
|
|
.fr-mt-3w
|
|
= f.submit t('views.shared.dossiers.messages.form.send_message'), class: 'fr-btn', data: { disable: true }
|