From 8b95da5ee54ff7cd4df604f9d4e810b9bfab7a67 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Tue, 8 Jan 2019 14:23:48 +0100 Subject: [PATCH] layouts: migrate sign_up to the shared layout --- .../users/registrations_controller.rb | 2 + app/views/users/registrations/new.html.haml | 43 +++++++------------ 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/app/controllers/users/registrations_controller.rb b/app/controllers/users/registrations_controller.rb index 27af0703f..508236087 100644 --- a/app/controllers/users/registrations_controller.rb +++ b/app/controllers/users/registrations_controller.rb @@ -6,6 +6,8 @@ class Users::RegistrationsController < Devise::RegistrationsController # super # end + layout 'procedure_context', only: [:new, :create] + # GET /resource/sign_up def new # Allow pre-filling the user email from a query parameter diff --git a/app/views/users/registrations/new.html.haml b/app/views/users/registrations/new.html.haml index 07a5af48c..775494e5f 100644 --- a/app/views/users/registrations/new.html.haml +++ b/app/views/users/registrations/new.html.haml @@ -1,33 +1,22 @@ -.two-columns.auth - .columns-container - .column.procedure-preview - = image_tag "landing/hero/dematerialiser.svg", class: "paperless-logo" - .baseline.center - %h3 Un outil simple - %p - pour gérer les formulaires - %br - administratifs dématérialisés. +.auth-form + = devise_error_messages! + = form_for resource, url: user_registration_path, html: { class: "form" } do |f| + %h1 Créez-vous un compte demarches-simplifiees.fr - .column.procedure-context-content.auth-form - = devise_error_messages! - = form_for resource, url: user_registration_path, html: { class: "form" } do |f| - %h1 Créez-vous un compte + = f.label :email, "Email" + = f.text_field :email, autofocus: true, placeholder: "Votre adresse email" - = f.label :email, "Email" - = f.text_field :email, autofocus: true + = f.label :password, "Mot de passe" + = f.password_field :password, value: @user.password, placeholder: "8 caractères minimum" - = f.label :password, "Mot de passe" - = f.password_field :password, value: @user.password, placeholder: "8 caractères minimum" + = f.submit "Créer un compte", class: "button large primary expand" - = f.submit "Créer un compte", class: "button large primary expand" + .separation.center + ou - .separation.center - ou + .center + = image_tag "login-with-fc-hover.svg", style: "display: none" + = link_to "", france_connect_particulier_path, class: "login-with-fc" - .center - = image_tag "login-with-fc-hover.svg", style: "display: none" - = link_to "", france_connect_particulier_path, class: "login-with-fc" - - .center - = link_to "Qu’est-ce que FranceConnect ?", "https://franceconnect.gouv.fr/", target: "_blank", class: "link" + .center + = link_to "Qu’est-ce que FranceConnect ?", "https://franceconnect.gouv.fr/", target: "_blank", class: "link"