2022-09-14 16:19:14 +02:00
|
|
|
|
- if dossier.france_connect_information.present?
|
|
|
|
|
- content_for(:notice_info) do
|
|
|
|
|
= render partial: "shared/dossiers/france_connect_informations_notice", locals: { user_information: dossier.france_connect_information }
|
|
|
|
|
|
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?
|
2022-09-08 11:26:18 +02:00
|
|
|
|
- form_options = { url: brouillon_dossier_url(dossier), method: :patch, data: { save_on_input: true } }
|
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-08-24 14:23:15 +02:00
|
|
|
|
= form_for dossier, form_options.merge({ html: { id: 'dossier-edit-form', class: 'form', multipart: true, novalidate: 'novalidate' } }) do |f|
|
2018-07-09 18:29:32 +02:00
|
|
|
|
|
2022-09-13 12:21:09 +02:00
|
|
|
|
%header.mb-6
|
|
|
|
|
.fr-highlight
|
|
|
|
|
%p.fr-text--sm
|
|
|
|
|
%strong
|
|
|
|
|
= t('utils.asterisk_html')
|
|
|
|
|
- if dossier.brouillon?
|
|
|
|
|
= t('views.shared.dossiers.edit.autosave')
|
|
|
|
|
|
|
|
|
|
- if notice_url(dossier.procedure).present?
|
2022-10-04 13:17:25 +02:00
|
|
|
|
.fr-download
|
|
|
|
|
%p
|
2022-10-10 19:04:57 +02:00
|
|
|
|
= link_to notice_url(dossier.procedure), download: "", class: "fr-download__link mr-2", title: t("views.shared.dossiers.edit.notice_title") do
|
2022-10-04 13:17:25 +02:00
|
|
|
|
= t("views.shared.dossiers.edit.notice")
|
|
|
|
|
- if dossier.procedure.notice.attached?
|
|
|
|
|
%span.fr-download__detail
|
|
|
|
|
= download_details(dossier.procedure.notice)
|
|
|
|
|
|
|
|
|
|
- if administrateur_signed_in?
|
|
|
|
|
%span.fr-text--xs.fr-text-mention--grey.visible-on-previous-hover
|
|
|
|
|
%span.fr-text-action-high--blue-france.fr-icon-questionnaire-line{ "aria-hidden": "true" }
|
|
|
|
|
= t('shared.ephemeral_link')
|
2022-09-19 12:10:31 +02:00
|
|
|
|
|
2021-03-03 18:21:00 +01:00
|
|
|
|
- if dossier.show_groupe_instructeur_selector?
|
2022-09-08 11:26:18 +02:00
|
|
|
|
%span{ data: { controller: 'autosave' } }
|
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,
|
2022-06-20 16:14:27 +02:00
|
|
|
|
dossier.procedure.groupe_instructeurs.where(closed: false).order(:label).map { |gi| [gi.label, gi.id] },
|
2022-05-06 19:52:55 +02:00
|
|
|
|
{ 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|
|
2022-09-08 11:25:39 +02:00
|
|
|
|
= render EditableChamp::EditableChampComponent.new form: form, champ: champ
|
2018-04-13 16:42:49 +02:00
|
|
|
|
|
2022-10-11 11:33:09 +02:00
|
|
|
|
- if !dossier.for_procedure_preview?
|
|
|
|
|
.dossier-edit-sticky-footer
|
|
|
|
|
.send-dossier-actions-bar
|
|
|
|
|
= render partial: 'shared/dossiers/autosave', locals: { dossier: dossier }
|
2022-09-08 11:26:18 +02:00
|
|
|
|
|
2022-10-11 11:33:09 +02:00
|
|
|
|
- if dossier.can_transition_to_en_construction?
|
|
|
|
|
= button_to t('views.shared.dossiers.edit.submit_dossier'), brouillon_dossier_url(dossier),
|
|
|
|
|
class: 'fr-btn fr-btn--sm',
|
|
|
|
|
disabled: !current_user.owns?(dossier),
|
|
|
|
|
method: :post,
|
|
|
|
|
data: { 'disable-with': "Envoi en cours…", controller: 'autosave-submit' }
|
2018-04-13 16:42:49 +02:00
|
|
|
|
|
2022-10-11 11:33:09 +02: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
|
|
|
|
|
2022-10-11 11:33:09 +02:00
|
|
|
|
= render partial: "shared/dossiers/submit_is_over", locals: { dossier: dossier }
|