can reset file input in messagerie
This commit is contained in:
parent
9ad2c4358a
commit
00e3d33ba4
3 changed files with 24 additions and 2 deletions
|
@ -8,8 +8,9 @@
|
|||
|
||||
= 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
|
||||
= render Attachment::EditComponent.new(attached_file: commentaire.piece_jointe)
|
||||
.fr-mt-3w{ data: { controller: "file-input-reset" } }
|
||||
%button.hidden.fr-btn.fr-btn--tertiary.fr-btn--sm.fr-icon-delete-line.fr-mr-1w{ 'aria-label': t('views.shared.messages.remove_file'), data: { 'file-input-reset-target': 'reset', action: 'file-input-reset#reset' } }
|
||||
= f.file_field :piece_jointe, direct_upload: true, data: { 'file-input-reset-target': 'input', action: 'change->file-input-reset#showResetButton' }
|
||||
|
||||
.fr-mt-3w
|
||||
= f.submit t('views.shared.dossiers.messages.form.send_message'), class: 'fr-btn', data: { disable: true }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue