feat(annotations): activate autosave
This commit is contained in:
parent
ff10a03ffe
commit
cbaa77fca7
24 changed files with 147 additions and 117 deletions
|
@ -1,25 +0,0 @@
|
|||
.autosave.autosave-state-idle{ data: { controller: 'autosave-status' } }
|
||||
%p.autosave-explanation.fr-text--sm
|
||||
%span.autosave-explanation-text
|
||||
- if dossier.brouillon?
|
||||
= t('views.users.dossiers.autosave.draft_explanation')
|
||||
- else
|
||||
= t('views.users.dossiers.autosave.explanation')
|
||||
= link_to t('views.users.dossiers.autosave.more_information'), t("links.common.faq.autosave_url"), class: 'autosave-more-infos fr-link fr-link--sm', **external_link_attributes
|
||||
|
||||
%p.autosave-status.succeeded
|
||||
%span.autosave-icon.icon.accept
|
||||
%span.autosave-label
|
||||
- if dossier.brouillon?
|
||||
= t('views.users.dossiers.autosave.draft_confirmation')
|
||||
- else
|
||||
= t('views.users.dossiers.autosave.confirmation')
|
||||
= link_to t('views.users.dossiers.autosave.more_information'), t("links.common.faq.autosave_url"), class: 'autosave-more-infos fr-link fr-link--sm', **external_link_attributes
|
||||
|
||||
%p.autosave-status.failed
|
||||
%span.autosave-icon ⚠️
|
||||
%span.autosave-label Impossible d’enregistrer le brouillon
|
||||
%button.button.small.autosave-retry{ type: :button, data: { action: 'autosave-status#onClickRetryButton', autosave_status_target: 'retryButton' } }
|
||||
%span.autosave-retry-label réessayer
|
||||
%span.autosave-retrying-label enregistrement en cours…
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
= 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 } }
|
||||
- form_options = { url: brouillon_dossier_url(dossier), method: :patch }
|
||||
- else
|
||||
- form_options = { url: modifier_dossier_url(dossier), method: :patch }
|
||||
= render Attachment::DeleteFormComponent.new
|
||||
|
@ -47,4 +47,4 @@
|
|||
= fields_for champ.input_name, champ do |form|
|
||||
= render EditableChamp::EditableChampComponent.new form: form, champ: champ
|
||||
|
||||
= render Dossiers::EditFooterComponent.new(dossier: dossier)
|
||||
= render Dossiers::EditFooterComponent.new(dossier: dossier, annotation: false)
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
= fields_for champ.input_name, champ do |form|
|
||||
= render EditableChamp::EditableChampComponent.new form: form, champ: champ, seen_at: seen_at
|
||||
|
||||
- if !dossier.for_procedure_preview?
|
||||
.send-wrapper
|
||||
= f.submit 'Sauvegarder', class: 'button primary send', data: { disable: true }
|
||||
|
||||
= render Dossiers::EditFooterComponent.new(dossier: dossier, annotation: true)
|
||||
- else
|
||||
%h2.empty-text Aucune annotation privée
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue