dossiers: give the edit form an unique id

This commit is contained in:
Pierre de La Morinerie 2019-11-06 14:03:08 +00:00
parent ac69c89a03
commit 03a7bc3d5a
2 changed files with 9 additions and 8 deletions

View file

@ -2,13 +2,13 @@
= render partial: "shared/dossiers/submit_is_over", locals: { dossier: dossier }
- if apercu
- form_options = { url: '', method: :get, html: { class: 'form', multipart: true } }
- form_options = { url: '', method: :get }
- elsif dossier.brouillon?
- form_options = { url: brouillon_dossier_url(dossier), method: :patch, html: { class: 'form', multipart: true } }
- form_options = { url: brouillon_dossier_url(dossier), method: :patch }
- else
- form_options = { url: modifier_dossier_url(dossier), method: :patch, html: { class: 'form', multipart: true } }
- form_options = { url: modifier_dossier_url(dossier), method: :patch }
= form_for dossier, form_options do |f|
= form_for dossier, form_options.merge({ html: { id: 'dossier-edit-form', class: 'form', multipart: true } }) do |f|
.prologue
%p.mandatory-explanation

View file

@ -3,8 +3,9 @@
- content_for :footer do
= render partial: "users/procedure_footer", locals: { procedure: @dossier.procedure, dossier: @dossier }
.dossier-header.sub-header
.container
= render partial: "shared/dossiers/header", locals: { dossier: @dossier, apercu: false }
#dossier-draft
.dossier-header.sub-header
.container
= render partial: "shared/dossiers/header", locals: { dossier: @dossier, apercu: false }
= render partial: "shared/dossiers/edit", locals: { dossier: @dossier, apercu: false }
= render partial: "shared/dossiers/edit", locals: { dossier: @dossier, apercu: false }