feat(EditComponent): add max_file_size and content_types to upload buttons inspired by dsfr

This commit is contained in:
Martin 2022-06-16 15:51:45 +02:00 committed by mfo
parent 3891b57473
commit 4ec61e58ac
23 changed files with 294 additions and 253 deletions

View file

@ -17,7 +17,7 @@
= form_for @avis, url: expert_avis_path(@avis.procedure, @avis), html: { class: 'form', data: { controller: 'persisted-form', persisted_form_key_value: dom_id(@avis) } } do |f|
= f.text_area :answer, rows: 3, placeholder: 'Votre avis', required: true
= render Attachment::EditComponent.text(f, @avis.piece_justificative_file)
= render Attachment::EditComponent.new(form: f, attached_file: @avis.piece_justificative_file, user_can_destroy: true)
.flex.justify-between.align-baseline
%p.confidentiel.flex

View file

@ -7,7 +7,7 @@
= f.text_area :introduction, rows: 3, value: avis.introduction || 'Bonjour, merci de me donner votre avis sur ce dossier.', required: true
%p.tab-title Ajouter une pièce jointe
.form-group
= render Attachment::EditComponent.text(f, avis.introduction_file)
= render Attachment::EditComponent.new(form: f, attached_file: avis.introduction_file, user_can_destroy: true)
- if linked_dossiers.present?
= f.check_box :invite_linked_dossiers, {}, true, false