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 }
|
|
|
|
|
|
2022-05-07 17:49:27 +02:00
|
|
|
|
- if dossier.brouillon?
|
2019-11-06 15:03:08 +01:00
|
|
|
|
- form_options = { url: brouillon_dossier_url(dossier), method: :patch }
|
2018-09-06 11:39:46 +02:00
|
|
|
|
- else
|
2019-11-06 15:03:08 +01:00
|
|
|
|
- form_options = { url: modifier_dossier_url(dossier), method: :patch }
|
2018-04-13 16:56:00 +02:00
|
|
|
|
|
2022-05-06 19:52:55 +02:00
|
|
|
|
= form_for dossier, form_options.merge({ html: { id: 'dossier-edit-form', class: 'form', multipart: true } }) do |f|
|
2018-07-09 18:29:32 +02:00
|
|
|
|
|
2018-07-11 17:11:44 +02:00
|
|
|
|
.prologue
|
2021-04-17 18:49:00 +02:00
|
|
|
|
%p.mandatory-explanation= t('utils.asterisk_html')
|
2019-07-29 10:54:19 +02:00
|
|
|
|
- if dossier.brouillon?
|
|
|
|
|
%p.mandatory-explanation
|
2022-05-07 17:49:27 +02:00
|
|
|
|
= t('views.shared.dossiers.edit.autosave')
|
2022-04-07 11:42:20 +02:00
|
|
|
|
- if dossier.france_connect_information.present?
|
2020-11-02 14:58:35 +01:00
|
|
|
|
= render partial: "shared/dossiers/france_connect_informations", locals: { user_information: dossier.france_connect_information }
|
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
|
|
|
|
|
2021-03-03 18:21:00 +01:00
|
|
|
|
- if dossier.show_groupe_instructeur_selector?
|
2022-05-07 17:49:27 +02:00
|
|
|
|
%span{ data: dossier.brouillon? ? { controller: 'autosave', autosave_url_value: brouillon_dossier_path(dossier) } : {} }
|
2022-05-06 19:52:55 +02:00
|
|
|
|
= f.label :groupe_instructeur_id do
|
|
|
|
|
= dossier.procedure.routing_criteria_name
|
|
|
|
|
%span.mandatory *
|
|
|
|
|
= f.select :groupe_instructeur_id,
|
|
|
|
|
dossier.procedure.groupe_instructeurs.order(:label).map { |gi| [gi.label, gi.id] },
|
|
|
|
|
{ include_blank: dossier.brouillon? }
|
2019-09-24 06:31:08 +02:00
|
|
|
|
|
2022-04-28 15:03:07 +02:00
|
|
|
|
- dossier.champs.each do |champ|
|
|
|
|
|
= fields_for champ.input_name, champ do |form|
|
|
|
|
|
= render partial: "shared/dossiers/editable_champs/editable_champ", locals: { form: form, champ: champ }
|
2018-04-13 16:42:49 +02:00
|
|
|
|
|
2022-04-07 11:42:20 +02:00
|
|
|
|
- if !dossier.for_procedure_preview?
|
2020-01-08 15:53:07 +01:00
|
|
|
|
.dossier-edit-sticky-footer
|
|
|
|
|
.send-dossier-actions-bar
|
|
|
|
|
- if dossier.brouillon?
|
2022-05-07 17:49:27 +02:00
|
|
|
|
= render partial: 'users/dossiers/autosave'
|
2018-04-13 16:42:49 +02:00
|
|
|
|
|
2020-01-08 15:53:07 +01:00
|
|
|
|
- if dossier.can_transition_to_en_construction?
|
2021-04-17 18:49:00 +02:00
|
|
|
|
= f.button t('views.shared.dossiers.edit.submit_dossier'),
|
2020-01-08 15:53:07 +01:00
|
|
|
|
name: :submit_draft,
|
|
|
|
|
value: true,
|
|
|
|
|
class: 'button send primary',
|
|
|
|
|
disabled: !current_user.owns?(dossier),
|
|
|
|
|
data: { 'disable-with': "Envoi en cours…" }
|
|
|
|
|
|
|
|
|
|
- else
|
2021-04-17 18:49:00 +02:00
|
|
|
|
= f.button t('views.shared.dossiers.edit.save_changes'),
|
2018-04-13 16:56:00 +02:00
|
|
|
|
class: 'button send primary',
|
2019-02-13 16:24:09 +01:00
|
|
|
|
data: { 'disable-with': "Envoi en cours…" }
|
2018-04-13 16:42:49 +02:00
|
|
|
|
|
2020-01-08 15:53:07 +01:00
|
|
|
|
- if dossier.brouillon? && !current_user.owns?(dossier)
|
|
|
|
|
.send-notice.invite-cannot-submit
|
|
|
|
|
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
|
|
|
|
|
2020-01-08 15:53:07 +01:00
|
|
|
|
= render partial: "shared/dossiers/submit_is_over", locals: { dossier: dossier }
|