.dossier-edit.container = render partial: "shared/dossiers/submit_is_over", locals: { dossier: dossier } - if dossier.brouillon? - form_options = { url: brouillon_dossier_url(dossier), method: :patch, data: { save_on_input: true } } - else - form_options = { url: modifier_dossier_url(dossier), method: :patch } = form_for dossier, form_options.merge({ 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') - if notice_url(dossier.procedure).present? %br = link_to t("views.shared.dossiers.edit.notice"), notice_url(dossier.procedure), class: "fr-btn fr-btn--secondary mt-2", title: t("views.shared.dossiers.edit.notice_title"), **external_link_attributes - if dossier.france_connect_information.present? = render partial: "shared/dossiers/france_connect_informations", locals: { user_information: dossier.france_connect_information } - 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.where(closed: false).order(:label).map { |gi| [gi.label, gi.id] }, { include_blank: dossier.brouillon? } - dossier.champs.each do |champ| = fields_for champ.input_name, champ do |form| = render EditableChamp::EditableChampComponent.new form: form, champ: champ - if !dossier.for_procedure_preview? .dossier-edit-sticky-footer .send-dossier-actions-bar = render partial: 'shared/dossiers/autosave', locals: { dossier: dossier } - if dossier.can_transition_to_en_construction? = f.button t('views.shared.dossiers.edit.submit_dossier'), name: :submit_draft, value: true, class: 'button send primary', disabled: !current_user.owns?(dossier), data: { 'disable-with': "Envoi en cours…" } - 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. = render partial: "shared/dossiers/submit_is_over", locals: { dossier: dossier }