2018-09-21 09:43:59 +02:00
|
|
|
|
.dossier-edit.container
|
2018-06-25 18:07:16 +02:00
|
|
|
|
= render partial: "shared/dossiers/submit_is_over", locals: { dossier: dossier }
|
|
|
|
|
|
2018-04-13 16:56:00 +02:00
|
|
|
|
- if apercu
|
|
|
|
|
- form_options = { url: '', method: :get, html: { class: 'form', multipart: true } }
|
2018-09-06 11:39:46 +02:00
|
|
|
|
- elsif dossier.brouillon?
|
2018-09-06 10:49:26 +02:00
|
|
|
|
- form_options = { url: brouillon_dossier_url(dossier), method: :patch, html: { class: 'form', multipart: true } }
|
2018-09-06 11:39:46 +02:00
|
|
|
|
- else
|
2018-09-06 15:36:50 +02:00
|
|
|
|
- form_options = { url: modifier_dossier_url(dossier), method: :patch, html: { class: 'form', multipart: true } }
|
2018-04-13 16:56:00 +02:00
|
|
|
|
|
|
|
|
|
= form_for dossier, form_options do |f|
|
2018-07-09 18:29:32 +02:00
|
|
|
|
|
2018-07-11 17:11:44 +02:00
|
|
|
|
.prologue
|
2019-06-13 11:22:48 +02:00
|
|
|
|
%p.mandatory-explanation
|
2018-07-20 10:23:34 +02:00
|
|
|
|
Les champs avec un astérisque (
|
2018-07-11 17:11:44 +02:00
|
|
|
|
%span.mandatory> *
|
2019-06-13 11:22:48 +02:00
|
|
|
|
) sont obligatoires.
|
2019-07-29 10:54:19 +02:00
|
|
|
|
- if dossier.brouillon?
|
|
|
|
|
%p.mandatory-explanation
|
|
|
|
|
Pour enregistrer votre dossier et le reprendre plus tard, cliquez sur le bouton « Enregistrer le brouillon » en bas à gauche du formulaire.
|
2018-07-09 18:29:32 +02:00
|
|
|
|
|
2018-07-11 17:11:44 +02:00
|
|
|
|
- if notice_url(dossier.procedure).present?
|
2019-03-05 18:16:13 +01:00
|
|
|
|
= link_to notice_url(dossier.procedure), target: '_blank', rel: 'noopener', class: 'button notice', title: "Pour vous aider à remplir votre dossier, vous pouvez consulter le guide de cette démarche." do
|
2018-07-11 17:11:44 +02:00
|
|
|
|
%span.icon.info>
|
|
|
|
|
Guide de la démarche
|
|
|
|
|
|
|
|
|
|
%hr
|
2018-07-09 18:29:32 +02:00
|
|
|
|
|
2018-04-13 16:42:49 +02:00
|
|
|
|
= f.fields_for :champs, dossier.champs do |champ_form|
|
|
|
|
|
- champ = champ_form.object
|
|
|
|
|
= render partial: "shared/dossiers/editable_champs/editable_champ",
|
|
|
|
|
locals: { champ: champ, form: champ_form }
|
|
|
|
|
|
2018-04-13 16:56:00 +02:00
|
|
|
|
- if !apercu
|
2019-08-14 18:54:45 +02:00
|
|
|
|
.send-dossier-wrapper
|
2018-04-13 16:56:00 +02:00
|
|
|
|
- if dossier.brouillon?
|
|
|
|
|
= f.button 'Enregistrer le brouillon',
|
|
|
|
|
formnovalidate: true,
|
2018-08-02 15:49:14 +02:00
|
|
|
|
name: :save_draft,
|
|
|
|
|
value: true,
|
2018-07-24 17:43:28 +02:00
|
|
|
|
class: 'button send secondary',
|
2019-02-13 16:24:09 +01:00
|
|
|
|
data: { 'disable-with': "Envoi en cours…" }
|
2018-04-13 16:42:49 +02:00
|
|
|
|
|
2018-08-01 17:27:50 +02:00
|
|
|
|
- if dossier.can_transition_to_en_construction?
|
2019-07-15 16:10:34 +02:00
|
|
|
|
= f.button 'Déposer le dossier',
|
2018-04-13 16:56:00 +02:00
|
|
|
|
class: 'button send primary',
|
2018-08-01 17:27:50 +02:00
|
|
|
|
disabled: !current_user.owns?(dossier),
|
2019-02-13 16:24:09 +01:00
|
|
|
|
data: { 'disable-with': "Envoi en cours…" }
|
2018-04-13 16:42:49 +02:00
|
|
|
|
|
2018-04-13 16:56:00 +02:00
|
|
|
|
- else
|
2018-06-18 16:45:38 +02:00
|
|
|
|
= f.button 'Enregistrer les modifications du dossier',
|
2018-04-13 16:42:49 +02:00
|
|
|
|
class: 'button send primary',
|
2019-02-13 16:24:09 +01:00
|
|
|
|
data: { 'disable-with': "Envoi en cours…" }
|
2018-06-25 18:07:16 +02:00
|
|
|
|
|
2018-08-01 17:27:50 +02:00
|
|
|
|
- if dossier.brouillon? && !current_user.owns?(dossier)
|
|
|
|
|
.send-notice.invite-cannot-submit
|
2019-07-15 16:10:34 +02:00
|
|
|
|
En tant qu’invité, vous pouvez remplir ce formulaire – mais le titulaire du dossier doit le déposer lui-même.
|
2018-08-01 17:27:50 +02:00
|
|
|
|
|
2018-06-25 18:07:16 +02:00
|
|
|
|
= render partial: "shared/dossiers/submit_is_over", locals: { dossier: dossier }
|