From 35da5d595f3e3781f420358392b81217a8d23106 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Wed, 26 Sep 2018 08:56:27 +0200 Subject: [PATCH] [Fix #1285] Redesign the administrateurs password activation page --- .../new_design/administrateurs_activate.scss | 4 +++ .../stylesheets/new_design/layouts.scss | 5 ++++ .../administrateurs/activate/new.html.haml | 30 ++++++++++++++----- 3 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 app/assets/stylesheets/new_design/administrateurs_activate.scss diff --git a/app/assets/stylesheets/new_design/administrateurs_activate.scss b/app/assets/stylesheets/new_design/administrateurs_activate.scss new file mode 100644 index 000000000..04393bdd0 --- /dev/null +++ b/app/assets/stylesheets/new_design/administrateurs_activate.scss @@ -0,0 +1,4 @@ +.administrateurs-activate.container { + margin-top: 60px; + margin-bottom: 60px; +} diff --git a/app/assets/stylesheets/new_design/layouts.scss b/app/assets/stylesheets/new_design/layouts.scss index d155581a3..ec83ec436 100644 --- a/app/assets/stylesheets/new_design/layouts.scss +++ b/app/assets/stylesheets/new_design/layouts.scss @@ -40,3 +40,8 @@ } } } + +.one-column-centered { + margin: auto; + max-width: $page-width / 2; +} diff --git a/app/views/administrateurs/activate/new.html.haml b/app/views/administrateurs/activate/new.html.haml index 256159867..6b9d0882d 100644 --- a/app/views/administrateurs/activate/new.html.haml +++ b/app/views/administrateurs/activate/new.html.haml @@ -1,8 +1,22 @@ -.container - = form_for @administrateur, url: { controller: 'administrateurs/activate', action: :create }, html: { class: "form" } do |f| - %br - %h1 - = @administrateur.email - = f.password_field :password, placeholder: 'Mot de passe' - = f.hidden_field :reset_password_token, value: params[:token] - = f.submit 'Définir le mot de passe', class: 'button large primary expand' +- content_for(:title, "Choix du mot de passe") + +- content_for :footer do + = render partial: "root/footer" + +.administrateurs-activate.container + .one-column-centered + = form_for @administrateur, url: { controller: 'administrateurs/activate', action: :create }, html: { class: "form" } do |f| + %br + %h1 + Choix du mot de passe + + = f.label :email, "Email" + = f.text_field :email, disabled: true + + = f.label :password do + Mot de passe + + = f.password_field :password, placeholder: 'Mot de passe' + + = f.hidden_field :reset_password_token, value: params[:token] + = f.submit 'Continuer', class: 'button large primary expand', id: "submit-password", data: { disable_with: "Envoi..." }