correctif(attachement_edit): ajoute le cmmposant <form> pour supprimer un attachment via le nouveau <button>
This commit is contained in:
parent
99b1bc718b
commit
f6fb1ceca5
10 changed files with 17 additions and 7 deletions
|
@ -9,11 +9,7 @@
|
|||
- form_options = { url: brouillon_dossier_url(dossier), method: :patch, data: { save_on_input: true } }
|
||||
- else
|
||||
- form_options = { url: modifier_dossier_url(dossier), method: :patch }
|
||||
|
||||
%div
|
||||
= form_tag('/attachments/:id', method: :delete, data: { 'turbo-method': :delete, turbo: true }, id: dom_id(ActiveStorage::Attachment.new, :delete)) do
|
||||
-# otherwise the closing tag bugs
|
||||
|
||||
= render Attachment::DeleteFormComponent.new
|
||||
= form_for dossier, form_options.merge({ html: { id: 'dossier-edit-form', class: 'form', multipart: true, novalidate: 'novalidate' } }) do |f|
|
||||
|
||||
%header.mb-6
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
= render Attachment::DeleteFormComponent.new
|
||||
= form_for(commentaire, url: form_url, html: { class: 'form', multipart: true, data: { controller: 'persisted-form', persisted_form_key_value: @dossier.present? ? dom_id(@dossier) : dom_id(@procedure, :bulk_message) } }) do |f|
|
||||
- dossier = commentaire.dossier
|
||||
- placeholder = t('views.shared.dossiers.messages.form.write_message_to_administration_placeholder')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue