chore(messagerie): add missing label on comment form

This commit is contained in:
Colin Darie 2024-04-15 12:31:20 +02:00 committed by Kara Diaby
parent 3b7b18ef90
commit 6748551240
3 changed files with 13 additions and 4 deletions

View file

@ -8,10 +8,13 @@
%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'})
- if local_assigns.has_key?(:dossier)
.fr-mt-3w{ data: { controller: "file-input-reset", delete_label: t('views.shared.messages.remove_file') } }
= render Attachment::MultipleComponent.new(attached_file: commentaire.piece_jointe)
%ul{ data: { 'file-input-reset-target': 'fileList' } }
.fr-mt-3w.fr-input-group
= f.label :piece_jointe, class: "fr-label"
%div{ data: { controller: "file-input-reset", delete_label: t('views.shared.messages.remove_file') } }
= render Attachment::MultipleComponent.new(attached_file: commentaire.piece_jointe)
%ul{ data: { 'file-input-reset-target': 'fileList' } }
.fr-mt-3w
= f.submit t('views.shared.dossiers.messages.form.send_message'), class: 'fr-btn', data: { disable: true }

View file

@ -0,0 +1,6 @@
en:
activerecord:
attributes:
commentaire:
body: 'Your message'
piece_jointe: "Attachment"

View file

@ -3,4 +3,4 @@ fr:
attributes:
commentaire:
body: 'Votre message'
file: fichier
piece_jointe: "Pièce jointe"