eca44ce60e
Update app/components/attachment/edit_component/edit_component.html.haml Co-authored-by: Paul Chavard <github@paul.chavard.net> Update app/views/shared/dossiers/_edit.html.haml Co-authored-by: Paul Chavard <github@paul.chavard.net> amelioration(attachment.destroy): force l'usage de turbo
54 lines
2.5 KiB
Text
54 lines
2.5 KiB
Text
- 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
|
|
= 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 }
|
|
|
|
%div
|
|
= form_tag('/attachments/:id', method: :delete, data: { 'turbo-method': :delete, turbo: true }, id: dom_id(ActiveStorage::Attachment.new, :delete)) do
|
|
-# otherwise the closing tag bugs
|
|
|
|
= 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?
|
|
.fr-download
|
|
%p
|
|
= link_to notice_url(dossier.procedure), download: "", class: "fr-download__link mr-2", title: t("views.shared.dossiers.edit.notice_title") do
|
|
= 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')
|
|
|
|
- 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? }
|
|
|
|
- dossier.champs_public.each do |champ|
|
|
= fields_for champ.input_name, champ do |form|
|
|
= render EditableChamp::EditableChampComponent.new form: form, champ: champ
|
|
|
|
= render Dossiers::EditFooterComponent.new(dossier: dossier)
|