From a43ec4e0d159af07afe2fdc0838627a217f04881 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 19 Oct 2017 16:04:45 +0200 Subject: [PATCH 1/3] Align the remember me and forgotten password items --- app/assets/stylesheets/new_design/auth.scss | 18 +++++++++++++++--- app/views/users/sessions/new.html.haml | 16 +++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/new_design/auth.scss b/app/assets/stylesheets/new_design/auth.scss index d1221bcd3..6109a22a3 100644 --- a/app/assets/stylesheets/new_design/auth.scss +++ b/app/assets/stylesheets/new_design/auth.scss @@ -65,13 +65,15 @@ $auth-breakpoint: $two-columns-breakpoint; } .auth-form { - .reset-password { - margin-top: - 3 * $default-spacer; - margin-bottom: $default-spacer; + .auth-options { + display: flex; + justify-content: space-between; + margin-bottom: 4 * $default-spacer; } .remember-me { display: inline-block; + margin-bottom: 0; } .separation { @@ -127,3 +129,13 @@ $auth-breakpoint: $two-columns-breakpoint; } } } + +.sign-in-form .form { + input[type="password"] { + margin-bottom: $default-spacer; + } + + input[type="checkbox"] { + margin-bottom: 0; + } +} diff --git a/app/views/users/sessions/new.html.haml b/app/views/users/sessions/new.html.haml index f58a19f6c..e00ee8a6d 100644 --- a/app/views/users/sessions/new.html.haml +++ b/app/views/users/sessions/new.html.haml @@ -22,7 +22,7 @@ .procedure-description = h simple_format(@dossier.procedure.description) - .column.auth-form + .column.auth-form.sign-in-form - if resource_name == :user %p.register %span @@ -40,13 +40,15 @@ = f.label :password, "Mot de passe" = f.password_field :password, value: @user.password, placeholder: "8 caractères minimum" - - if [:user, :gestionnaire].include?(resource_name) - .reset-password.text-right - = link_to "Mot de passe oublié ?", new_password_path(resource_name), class: "link" + .auth-options + - if devise_mapping.rememberable? + %div + = f.check_box :remember_me, as: :boolean + = f.label :remember_me, "Se souvenir de moi", class: 'remember-me' - - if devise_mapping.rememberable? - = f.check_box :remember_me, as: :boolean - = f.label :remember_me, "Se souvenir de moi", class: 'remember-me' + - if [:user, :gestionnaire].include?(resource_name) + .text-right + = link_to "Mot de passe oublié ?", new_password_path(resource_name), class: "link" = f.submit "Se connecter", class: "button large primary expand" From c66342aa2f9ce9e7eb6b553240001545be6d3b43 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 24 Dec 2018 15:07:18 +0100 Subject: [PATCH 2/3] Add a CTA in the header on the registration page --- app/views/layouts/_new_header.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_new_header.haml b/app/views/layouts/_new_header.haml index 4b2da6288..616ade33b 100644 --- a/app/views/layouts/_new_header.haml +++ b/app/views/layouts/_new_header.haml @@ -85,7 +85,9 @@ = link_to destroy_user_session_path, method: :delete, class: "menu-item menu-link" do = image_tag "icons/sign-out.svg" Se déconnecter - - elsif request.path != new_user_session_path + - if request.path == new_user_registration_path + %li + Vous avez déjà un compte ? %li = link_to "Connexion", new_user_session_path, class: "button secondary" From fd2b44b45e406265e2f4fbef0a4de1a781dd54b8 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Mon, 24 Dec 2018 15:07:32 +0100 Subject: [PATCH 3/3] Fix the FC info link --- app/views/users/sessions/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/sessions/new.html.haml b/app/views/users/sessions/new.html.haml index e00ee8a6d..60a3b347c 100644 --- a/app/views/users/sessions/new.html.haml +++ b/app/views/users/sessions/new.html.haml @@ -60,4 +60,4 @@ = link_to "", france_connect_particulier_path, class: "login-with-fc" .center - = link_to "Qu’est-ce que FranceConnect ?", "https://app.franceconnect.gouv.fr/en-savoir-plus", target: "_blank", class: "link" + = link_to "Qu’est-ce que FranceConnect ?", "https://franceconnect.gouv.fr/", target: "_blank", class: "link"