From 44cb588c422cfe5e3e28772e029d99900cef7cde Mon Sep 17 00:00:00 2001 From: Benoit Queyron Date: Thu, 13 Jun 2024 12:08:37 +0200 Subject: [PATCH 1/3] mise en page & traduction page session --- app/views/users/sessions/link_sent.html.haml | 37 ++++++++++---------- config/locales/en.yml | 3 ++ config/locales/fr.yml | 3 ++ 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/app/views/users/sessions/link_sent.html.haml b/app/views/users/sessions/link_sent.html.haml index 66ef59192..26b7e69e5 100644 --- a/app/views/users/sessions/link_sent.html.haml +++ b/app/views/users/sessions/link_sent.html.haml @@ -3,27 +3,26 @@ - content_for :footer do = render partial: 'root/footer' -.fr-container.fr-my-5w - .fr-grid-row - .fr-col-12.fr-col-offset-md-1.fr-col-md-7 - %h1.fr-mt-6w Encore une petite étape ! +.fr-container + .fr-col-12.fr-col-md-6.fr-col-offset-md-3 + %h1.fr-mt-6w.fr-h2.center + = t('views.confirmation.new.title') - %section - %p.fr-text--lead - Nous venons de vous envoyer un courriel sur votre boite email #{@email}. - Veuillez l’ouvrir et cliquer sur le lien de connexion sécurisée à #{Current.application_name}. + %p.center{ aria: { hidden: true } }= image_tag("user/confirmation-email.svg", alt: t('views.confirmation.new.image_alt')) - %p.fr-text--lead - Ce lien est valide une semaine et peut être réutilisé plusieurs fois. + = render Dsfr::AlertComponent.new(title: '', state: :info, heading_level: 'h2', extra_class_names: 'fr-mt-6w fr-mb-3w') do |c| + - c.with_body do + %p= t('views.users.sessions.link_sent.email_cta_html', email: @email) + %p= t('views.confirmation.new.email_guidelines_html') - %p.fr-text--sm.fr-text-mention--grey - Ce courriel peut mettre jusqu’à 15 minutes pour arriver. Si vous n’avez pas reçu de courriel (n’hésitez pas à vérifier dans les indésirables), cliquez sur le bouton ci-dessous. + %p.fr-text--sm.fr-text-mention--grey.fr-mb-1w + = t('views.confirmation.new.email_missing') - = button_to instructeurs_reset_link_sent_path, class: 'fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-mail-line', method: 'POST' do - Renvoyer le courriel + = button_to instructeurs_reset_link_sent_path, class: 'fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-mail-line', method: 'POST' do + = t('views.confirmation.new.resent') - %section - %p.fr-mt-3w - Si vous voyez cette page trop souvent, #{link_to "consultez notre aide", t("links.common.faq.confirmer_compte_chaque_connexion_url")} - %p.fr-mt-3w - = t('views.users.shared.contact_us_if_any_trouble_html', href: contact_admin_url) + %p.fr-text--sm.fr-text-mention--grey.fr-mt-3w + = t('views.users.sessions.link_sent.consult_help_page_html', href: t("links.common.faq.confirmer_compte_chaque_connexion_url")) + + %p.fr-text--sm.fr-text-mention--grey.fr-mt-3w.fr-mb-6w + = t('views.users.shared.contact_us_if_any_trouble_html', href: contact_admin_url) diff --git a/config/locales/en.yml b/config/locales/en.yml index a05c394b2..c4a9ea309 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -554,6 +554,9 @@ en: connect_with_agent_connect: Visit our dedicated page subtitle: "Sign in with my account" for_tiers_alert: If you are completing a forme for someone else, you must use your own credentials. + link_sent: + consult_help_page_html: If you're seeing this page too often, please consult our help page. + email_cta_html: "We have to validate your email address %{email}." passwords: edit: subtitle: Change password diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 42896bd24..24815f182 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -557,6 +557,9 @@ fr: connect_with_agent_connect: Accédez à notre page dédiée subtitle: "Se connecter avec son compte" for_tiers_alert: Si vous remplissez un dossier pour un tiers, vous devez utiliser vos propres identifiants. + link_sent: + consult_help_page_html: Si vous voyez cette page trop souvent, consultez notre aide. + email_cta_html: "Nous avons besoin de vérifier votre adresse électronique %{email}." passwords: edit: subtitle: Changement de mot de passe From d124127f10a064c9774eb70363ccfe011d6683a9 Mon Sep 17 00:00:00 2001 From: Benoit Queyron Date: Thu, 13 Jun 2024 12:35:02 +0200 Subject: [PATCH 2/3] ajustements de front avec la page confirmation --- app/views/users/confirmations/new.html.haml | 4 +++- app/views/users/sessions/link_sent.html.haml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/users/confirmations/new.html.haml b/app/views/users/confirmations/new.html.haml index 587531801..786c1aa89 100644 --- a/app/views/users/confirmations/new.html.haml +++ b/app/views/users/confirmations/new.html.haml @@ -17,7 +17,9 @@ %p= t('views.confirmation.new.email_cta_html', email: resource.email) %p= t('views.confirmation.new.email_guidelines_html') + %p.fr-text--sm.fr-text-mention--grey.fr-mb-1w + = t('views.confirmation.new.email_missing') + = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { class: 'fr-mb-6w'}) do |f| - %legend.fr-hint-text.fr-mb-3w= t('views.confirmation.new.email_missing') = f.hidden_field :email = f.submit t('views.confirmation.new.resent'), class: 'fr-btn fr-btn--secondary' diff --git a/app/views/users/sessions/link_sent.html.haml b/app/views/users/sessions/link_sent.html.haml index 26b7e69e5..270ff697a 100644 --- a/app/views/users/sessions/link_sent.html.haml +++ b/app/views/users/sessions/link_sent.html.haml @@ -18,7 +18,7 @@ %p.fr-text--sm.fr-text-mention--grey.fr-mb-1w = t('views.confirmation.new.email_missing') - = button_to instructeurs_reset_link_sent_path, class: 'fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-mail-line', method: 'POST' do + = button_to instructeurs_reset_link_sent_path, class: 'fr-btn fr-btn--secondary', method: 'POST' do = t('views.confirmation.new.resent') %p.fr-text--sm.fr-text-mention--grey.fr-mt-3w From 88c957806f13aaf7a66f9a60acbb36f25ebfbd29 Mon Sep 17 00:00:00 2001 From: Benoit Queyron Date: Thu, 13 Jun 2024 14:01:05 +0200 Subject: [PATCH 3/3] fix link faq --- app/controllers/application_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 32d8c088f..bc172fe47 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -312,7 +312,8 @@ class ApplicationController < ActionController::Base path == '/contact-admin' || path.start_with?('/connexion-par-jeton') || path.start_with?('/api/') || - path.start_with?('/lien-envoye') + path.start_with?('/lien-envoye') || + path.start_with?('/faq') false else