From 6383dc359b2ae7ddcdf3286ea5afce4334134a3a Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Thu, 25 Jul 2024 14:05:42 +0200 Subject: [PATCH 1/5] Remove useless aria-labelledby attribute --- app/views/devise/passwords/new.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index e2f68f417..78737be64 100644 --- a/app/views/devise/passwords/new.html.haml +++ b/app/views/devise/passwords/new.html.haml @@ -9,8 +9,8 @@ = devise_error_messages! = form_for(resource, as: resource_name, url: password_path(resource_name)) do |f| - %fieldset.fr-mb-0.fr-fieldset{ aria: { labelledby: 'new-password-legend' } } - %legend.fr-fieldset__legend#new-password-legend + %fieldset.fr-mb-0.fr-fieldset + %legend.fr-fieldset__legend %h1.fr-h2= t('devise.passwords.new.forgot_your_password') .fr-fieldset__element From 444a96a5ee89cbe362bdc6609ac2b280810dd704 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Thu, 25 Jul 2024 16:41:17 +0200 Subject: [PATCH 2/5] Prevent buttons from overflowing their container --- app/assets/stylesheets/01_common.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/stylesheets/01_common.scss b/app/assets/stylesheets/01_common.scss index 47b94bc1d..a0a1d51b3 100644 --- a/app/assets/stylesheets/01_common.scss +++ b/app/assets/stylesheets/01_common.scss @@ -6,6 +6,11 @@ body { scroll-behavior: smooth; } +// Forces line breaks to prevent buttons from overflowing their container +input[type="submit"] { + white-space: normal; +} + .page-wrapper { position: relative; min-height: 100%; From 07b4d59426270b13b907b46dc5b4d3c45d29ea30 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Thu, 25 Jul 2024 17:12:58 +0200 Subject: [PATCH 3/5] Add forgetten alt attribute --- app/views/users/passwords/reset_link_sent.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/passwords/reset_link_sent.html.haml b/app/views/users/passwords/reset_link_sent.html.haml index 200631a1f..09460a963 100644 --- a/app/views/users/passwords/reset_link_sent.html.haml +++ b/app/views/users/passwords/reset_link_sent.html.haml @@ -4,7 +4,7 @@ = render partial: 'root/footer' #link-sent.container - = image_tag('user/confirmation-email.svg', "aria-hidden": true) + = image_tag('user/confirmation-email.svg', alt: "") %h1 = t('views.users.passwords.reset_link_sent.got_it') %br From f5962162082ce5ff1eba35b362e8afe329710693 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Thu, 25 Jul 2024 17:23:07 +0200 Subject: [PATCH 4/5] Remove code legacy --- app/assets/stylesheets/link-sent.scss | 15 --------------- .../users/passwords/reset_link_sent.html.haml | 4 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/app/assets/stylesheets/link-sent.scss b/app/assets/stylesheets/link-sent.scss index c22d6d6f4..b5b87e0dc 100644 --- a/app/assets/stylesheets/link-sent.scss +++ b/app/assets/stylesheets/link-sent.scss @@ -12,12 +12,6 @@ margin: 3 * $default-padding auto; } - p, - ol { - margin-top: $default-padding; - margin-bottom: $default-padding; - } - .link-sent-info { color: #000000; background-color: $yellow; @@ -30,13 +24,4 @@ padding-top: $default-padding; margin-bottom: $default-padding; } - - .link-sent-help-title { - font-weight: bold; - } - - .link-sent-help-list { - list-style-position: outside; - padding-left: $default-padding; - } } diff --git a/app/views/users/passwords/reset_link_sent.html.haml b/app/views/users/passwords/reset_link_sent.html.haml index 09460a963..7ef57eafb 100644 --- a/app/views/users/passwords/reset_link_sent.html.haml +++ b/app/views/users/passwords/reset_link_sent.html.haml @@ -19,8 +19,8 @@ = t('views.users.shared.email_can_take_a_while_html') %section.link-sent-help - %h2.link-sent-help-title= t('views.users.passwords.reset_link_sent.no_mail') - %ol.link-sent-help-list + %h2= t('views.users.passwords.reset_link_sent.no_mail') + %ol %li = t('views.users.passwords.reset_link_sent.check_spams') %li From 8057f050f46b78a6cb0e3ccfa5e33d177cec6068 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Fri, 26 Jul 2024 10:52:22 +0200 Subject: [PATCH 5/5] Apply DSFR instead of custom classes --- app/assets/stylesheets/link-sent.scss | 27 --------- .../users/passwords/reset_link_sent.html.haml | 55 ++++++++++--------- 2 files changed, 28 insertions(+), 54 deletions(-) delete mode 100644 app/assets/stylesheets/link-sent.scss diff --git a/app/assets/stylesheets/link-sent.scss b/app/assets/stylesheets/link-sent.scss deleted file mode 100644 index b5b87e0dc..000000000 --- a/app/assets/stylesheets/link-sent.scss +++ /dev/null @@ -1,27 +0,0 @@ -@import "constants"; -@import "colors"; - -#link-sent { - padding-top: 2 * $default-padding; - padding-bottom: 2 * $default-padding; - text-align: center; - max-width: 700px; - - section { - text-align: left; - margin: 3 * $default-padding auto; - } - - .link-sent-info { - color: #000000; - background-color: $yellow; - padding: 0 $default-padding; - border: 1px solid transparent; // prevent margin collapse of first paragraph - } - - .link-sent-help { - border-top: 1px solid $grey; - padding-top: $default-padding; - margin-bottom: $default-padding; - } -} diff --git a/app/views/users/passwords/reset_link_sent.html.haml b/app/views/users/passwords/reset_link_sent.html.haml index 7ef57eafb..712bb866a 100644 --- a/app/views/users/passwords/reset_link_sent.html.haml +++ b/app/views/users/passwords/reset_link_sent.html.haml @@ -3,33 +3,34 @@ - content_for :footer do = render partial: 'root/footer' -#link-sent.container - = image_tag('user/confirmation-email.svg', alt: "") - %h1 - = t('views.users.passwords.reset_link_sent.got_it') - %br - = t('views.users.passwords.reset_link_sent.open_your_mailbox') +.fr-container.fr-mt-4w.fr-mb-3w + .fr-grid-row.fr-grid-row--center + .fr-col-12.fr-col-md-9.fr-col-lg-7 + .center + = image_tag('user/confirmation-email.svg', alt: "") + %h1.fr-mb-6w + = t('views.users.passwords.reset_link_sent.got_it') + %br + = t('views.users.passwords.reset_link_sent.open_your_mailbox') - %section.link-sent-info - %p - = t('views.users.passwords.reset_link_sent.email_sent_html', email: @email, application_name: Current.application_name) - %p - = t('views.users.passwords.reset_link_sent.click_link_to_reset_password') - %p - = t('views.users.shared.email_can_take_a_while_html') + .fr-callout.fr-callout--green-emeraude.fr-mb-6w + %p.fr-callout__text.fr-mb-2w + = t('views.users.passwords.reset_link_sent.email_sent_html', email: @email, application_name: Current.application_name) + %p.fr-callout__text.fr-mb-2w + = t('views.users.passwords.reset_link_sent.click_link_to_reset_password') + %p.fr-callout__text + = t('views.users.shared.email_can_take_a_while_html') - %section.link-sent-help - %h2= t('views.users.passwords.reset_link_sent.no_mail') - %ol - %li - = t('views.users.passwords.reset_link_sent.check_spams') - %li - = t('views.users.passwords.reset_link_sent.check_account', email: @email, application_name: Current.application_name) - - if FranceConnectService.enabled? + %h2= t('views.users.passwords.reset_link_sent.no_mail') + %ol %li - = t('views.users.passwords.reset_link_sent.check_france_connect_html', href: france_connect_particulier_path) - - %li - = t('views.users.passwords.reset_link_sent.check_gpdr') - %p - = t('views.users.shared.contact_us_if_any_trouble_html', href: contact_url) + = t('views.users.passwords.reset_link_sent.check_spams') + %li + = t('views.users.passwords.reset_link_sent.check_account', email: @email, application_name: Current.application_name) + - if FranceConnectService.enabled? + %li + = t('views.users.passwords.reset_link_sent.check_france_connect_html', href: france_connect_particulier_path) + %li + = t('views.users.passwords.reset_link_sent.check_gpdr') + %p + = t('views.users.shared.contact_us_if_any_trouble_html', href: contact_url)