From 6f0cf19f0d6815f9c3266cbc911d36e8c4a3ef32 Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Mon, 27 May 2024 15:08:28 +0200 Subject: [PATCH] page SVA SVR --- .../sva_svr_form_component.en.yml | 2 +- .../sva_svr_form_component.fr.yml | 2 +- .../sva_svr_form_component.html.haml | 69 ++++++++++--------- .../administrateurs/sva_svr/edit.html.haml | 6 +- 4 files changed, 43 insertions(+), 36 deletions(-) diff --git a/app/components/procedure/sva_svr_form_component/sva_svr_form_component.en.yml b/app/components/procedure/sva_svr_form_component/sva_svr_form_component.en.yml index f168f6503..0e285fc49 100644 --- a/app/components/procedure/sva_svr_form_component/sva_svr_form_component.en.yml +++ b/app/components/procedure/sva_svr_form_component/sva_svr_form_component.en.yml @@ -11,7 +11,7 @@ en: When an instructor asks for a file to be corrected, the countdown of the delay is interrupted. The delay resumes when the applicant resubmits their file stating that they have made the requested corrections. If the file has been declared incomplete, the delay will be reset, regardless of the configuration below. - submit: Apply SVA/SVR configuration + submit: Save cancel: Cancel decision_buttons: disabled: "Disabled" diff --git a/app/components/procedure/sva_svr_form_component/sva_svr_form_component.fr.yml b/app/components/procedure/sva_svr_form_component/sva_svr_form_component.fr.yml index 9a0316585..afb32dea3 100644 --- a/app/components/procedure/sva_svr_form_component/sva_svr_form_component.fr.yml +++ b/app/components/procedure/sva_svr_form_component/sva_svr_form_component.fr.yml @@ -11,7 +11,7 @@ fr: Lorsqu’un instructeur demande de corriger un dossier, le décompte du délai est interrompu. Le délai reprend lorsque le demandeur redépose son dossier en déclarant avoir effectué les corrections demandées. Si le dossier avait été déclaré incomplet, le délai sera réinitialisé, quelle que soit la configuration ci-dessous. - submit: Appliquer la configuration SVA/SVR + submit: Enregistrer cancel: Annuler decision_buttons: disabled: "Désactivé" diff --git a/app/components/procedure/sva_svr_form_component/sva_svr_form_component.html.haml b/app/components/procedure/sva_svr_form_component/sva_svr_form_component.html.haml index 121f939f8..1eac6cb13 100644 --- a/app/components/procedure/sva_svr_form_component/sva_svr_form_component.html.haml +++ b/app/components/procedure/sva_svr_form_component/sva_svr_form_component.html.haml @@ -1,40 +1,47 @@ = form_for [procedure, configuration], url: admin_procedure_sva_svr_path(procedure), method: :put do |f| - - if !procedure.feature_enabled?(:sva) - .fr-alert.fr-alert--info.fr-alert--sm.fr-my-8w - %p - Pour activer le paramétrage de cette fonctionnalité, contactez-nous sur - = link_to CONTACT_EMAIL, "mailto:#{CONTACT_EMAIL}", **helpers.external_link_attributes - en indiquant votre numéro de démarche (#{@procedure.id}) et le cadre d’application du SVA/SVR. + .fr-container + - if !procedure.feature_enabled?(:sva) + .fr-alert.fr-alert--info.fr-alert--sm.fr-mb-5w + %p + Pour activer le paramétrage de cette fonctionnalité, contactez-nous sur + = link_to CONTACT_EMAIL, "mailto:#{CONTACT_EMAIL}", **helpers.external_link_attributes + en indiquant votre numéro de démarche (#{@procedure.id}) et le cadre d’application du SVA/SVR. - - elsif procedure.publiee? && !procedure.sva_svr_enabled? - .fr-alert.fr-alert--info.fr-alert--sm.fr-mb-4w - %p= t('.notice_new_files_only') + - elsif procedure.publiee? && !procedure.sva_svr_enabled? + .fr-alert.fr-alert--info.fr-alert--sm.fr-mb-4w + %p= t('.notice_new_files_only') - - if procedure.publiee? && procedure.sva_svr_enabled? - .fr-alert.fr-alert--warning.fr-alert--sm.fr-mb-4w - %p= t('.notice_edit_denied') + - if procedure.publiee? && procedure.sva_svr_enabled? + .fr-alert.fr-alert--warning.fr-alert--sm.fr-mb-4w + %p= t('.notice_edit_denied') - %fieldset.fr-fieldset - %legend.fr-fieldset__legend= t(".rule") - = render Dsfr::RadioButtonListComponent.new(form: f, target: :decision, buttons: decision_buttons, error: configuration.errors[:decision].first) + %fieldset.fr-fieldset + %legend.fr-fieldset__legend= t(".rule") + = render Dsfr::RadioButtonListComponent.new(form: f, target: :decision, buttons: decision_buttons, error: configuration.errors[:decision].first) - %fieldset.fr-fieldset - %legend.fr-fieldset__legend= t(".delay") - .fr-fieldset__element.fr-fieldset__element--inline - .fr-input-group - = f.number_field :period, class: 'fr-input', disabled: form_disabled? - .fr-fieldset__element.fr-fieldset__element--inline - .fr-select-group - = f.select :unit, options_for_select(SVASVRConfiguration.unit_options.map { [t(_1, scope: ".unit_labels"), _1] }, selected: configuration.unit), {}, class: 'fr-select', disabled: form_disabled? + %fieldset.fr-fieldset + %legend.fr-fieldset__legend= t(".delay") + .fr-fieldset__element.fr-fieldset__element--inline + .fr-input-group + = f.number_field :period, class: 'fr-input', disabled: form_disabled? + .fr-fieldset__element.fr-fieldset__element--inline + .fr-select-group + = f.select :unit, options_for_select(SVASVRConfiguration.unit_options.map { [t(_1, scope: ".unit_labels"), _1] }, selected: configuration.unit), {}, class: 'fr-select', disabled: form_disabled? - %fieldset.fr-fieldset - %legend.fr-fieldset__legend - = t(".resume_method") + %fieldset.fr-fieldset + %legend.fr-fieldset__legend + = t(".resume_method") - %span.fr-hint-text - = t(".resume_intro") + %span.fr-hint-text + = t(".resume_intro") - = render Dsfr::RadioButtonListComponent.new(form: f, target: :resume, buttons: resume_buttons) + = render Dsfr::RadioButtonListComponent.new(form: f, target: :resume, buttons: resume_buttons) - = f.submit t(".submit"), class: "fr-btn", disabled: form_disabled? - = link_to t(".cancel"), admin_procedure_path(procedure.id), class: "fr-btn fr-btn--secondary fr-ml-2w" + .padded-fixed-footer + .fixed-footer + .fr-container + %ul.fr-btns-group.fr-btns-group--inline-md + %li + = link_to "Annuler et revenir à l'écran de gestion", admin_procedure_path(id: @procedure), class: 'fr-btn fr-btn--secondary', data: { confirm: 'Êtes-vous sûr de vouloir annuler les modifications effectuées ?'} + %li + = f.submit t(".submit"), class: "fr-btn", disabled: form_disabled? diff --git a/app/views/administrateurs/sva_svr/edit.html.haml b/app/views/administrateurs/sva_svr/edit.html.haml index 715938671..2c026b42b 100644 --- a/app/views/administrateurs/sva_svr/edit.html.haml +++ b/app/views/administrateurs/sva_svr/edit.html.haml @@ -1,10 +1,10 @@ = render partial: 'administrateurs/breadcrumbs', locals: { steps: [['Démarches', admin_procedures_path], ["#{@procedure.libelle.truncate_words(10)}", admin_procedure_path(@procedure)], - ["Configuration SVA/SVR"]] } + ["Silence Vaut Accord ou Rejet"]] } .fr-container.fr-my-5w - %h1.fr-h1 Règle du Silence Vaut Accord ou Silence Vaut Rejet + %h1.fr-h2 Silence Vaut Accord ou Rejet = render Dsfr::CalloutComponent.new(title: "Fonctionnement du SVA/SVR") do |c| - c.with_body do @@ -40,4 +40,4 @@ = link_to("Liste des démarches encadrées par ce principe", "https://www.service-public.fr/demarches-silence-vaut-accord", class: "fr-link", title: new_tab_suffix("Rechercher les démarches avec SVA sur service-public.fr"), **external_link_attributes) - = render Procedure::SVASVRFormComponent.new(procedure: @procedure, configuration: @configuration) += render Procedure::SVASVRFormComponent.new(procedure: @procedure, configuration: @configuration)