demarches-normaliennes/app/views/shared/dossiers/_edit.html.haml

40 lines
2 KiB
Text
Raw Normal View History

- dossier_for_editing = dossier.en_construction? ? dossier.owner_editing_fork : dossier
- 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 }
.dossier-edit.container.counter-start-header-section
= render partial: "shared/dossiers/submit_is_over", locals: { dossier: dossier }
= render NestedForms::FormOwnerComponent.new
= form_for dossier_for_editing, url: brouillon_dossier_url(dossier), method: :patch, html: { id: 'dossier-edit-form', class: 'form', multipart: true, novalidate: 'novalidate' } do |f|
%header.mb-6
.fr-highlight
%p.fr-text--sm
%strong
= t('utils.asterisk_html')
- if dossier.brouillon?
= t('views.shared.dossiers.edit.autosave')
2023-06-07 10:52:24 +02:00
- if dossier.procedure.notice.attached?
= render Dsfr::DownloadComponent.new(attachment: dossier.procedure.notice , url: notice_url(dossier.procedure), name: t("views.shared.dossiers.edit.notice"), ephemeral_link: administrateur_signed_in?)
- if dossier.show_groupe_instructeur_selector?
%span{ data: { controller: 'autosave' } }
= f.label :groupe_instructeur_id do
= dossier.procedure.routing_criteria_name
%span.mandatory *
= f.select :groupe_instructeur_id,
dossier.procedure.groupe_instructeurs.active.map { |gi| [gi.label, gi.id] },
{ include_blank: dossier.brouillon? }
= render EditableChamp::SectionComponent.new(champs: dossier_for_editing.champs_public)
- if dossier.pending_correction?
.fr-checkbox-group.fr-my-3w
= check_box_tag field_name(:dossier, :pending_correction_confirm), "1", false, form: "form-submit-en-construction"
%label.fr-label{ for: :dossier_pending_correction_confirm }= t('views.shared.dossiers.edit.pending_correction.confirm_label')
= render Dossiers::EditFooterComponent.new(dossier: dossier_for_editing, annotation: false)