diff --git a/app/views/shared/dossiers/messages/_form.html.haml b/app/views/shared/dossiers/messages/_form.html.haml index eb0c3ecd3..bd0cfe98e 100644 --- a/app/views/shared/dossiers/messages/_form.html.haml +++ b/app/views/shared/dossiers/messages/_form.html.haml @@ -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 } diff --git a/config/locales/models/commentaire/en.yml b/config/locales/models/commentaire/en.yml new file mode 100644 index 000000000..a97b7e0e7 --- /dev/null +++ b/config/locales/models/commentaire/en.yml @@ -0,0 +1,6 @@ +en: + activerecord: + attributes: + commentaire: + body: 'Your message' + piece_jointe: "Attachment" diff --git a/config/locales/models/commentaire/fr.yml b/config/locales/models/commentaire/fr.yml index 71ed7e25e..a4c17be96 100644 --- a/config/locales/models/commentaire/fr.yml +++ b/config/locales/models/commentaire/fr.yml @@ -3,4 +3,4 @@ fr: attributes: commentaire: body: 'Votre message' - file: fichier + piece_jointe: "Pièce jointe"