session: migrate the password pages to the new design
This commit is contained in:
parent
bfd106ba30
commit
627df7a1f3
3 changed files with 35 additions and 44 deletions
|
@ -1,4 +1,6 @@
|
||||||
class Users::PasswordsController < Devise::PasswordsController
|
class Users::PasswordsController < Devise::PasswordsController
|
||||||
|
layout "new_application"
|
||||||
|
|
||||||
after_action :try_to_authenticate_gestionnaire, only: [:update]
|
after_action :try_to_authenticate_gestionnaire, only: [:update]
|
||||||
after_action :try_to_authenticate_administrateur, only: [:update]
|
after_action :try_to_authenticate_administrateur, only: [:update]
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,22 @@
|
||||||
= devise_error_messages!
|
- content_for(:title, 'Changement de mot de passe')
|
||||||
|
|
||||||
#form-login
|
- content_for :footer do
|
||||||
%h2#gestionnaire_login Changement de mot de passe
|
= render partial: 'root/footer'
|
||||||
|
|
||||||
|
.container.devise-container
|
||||||
|
.one-column-centered
|
||||||
|
= devise_error_messages!
|
||||||
|
|
||||||
|
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :patch, class: 'form' }) do |f|
|
||||||
|
|
||||||
|
%h1 Changement de mot de passe
|
||||||
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
#new-user
|
|
||||||
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
|
|
||||||
= f.hidden_field :reset_password_token
|
= f.hidden_field :reset_password_token
|
||||||
%h4
|
|
||||||
= f.label 'Nouveau mot de passe'
|
|
||||||
|
|
||||||
.input-group
|
= f.label 'Nouveau mot de passe'
|
||||||
.input-group-addon
|
= f.password_field :password, autofocus: true, autocomplete: 'off'
|
||||||
%span.fa.fa-asterisk
|
|
||||||
= f.password_field :password, autofocus: true, autocomplete: "off", class: 'form-control'
|
= f.label 'Confirmez le nouveau mot de passe'
|
||||||
%br
|
= f.password_field :password_confirmation, autocomplete: 'off'
|
||||||
%h4
|
|
||||||
= f.label 'Retaper le mot de passe'
|
= f.submit 'Changer le mot de passe', class: 'button primary'
|
||||||
.input-group
|
|
||||||
.input-group-addon
|
|
||||||
%span.fa.fa-asterisk
|
|
||||||
= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control'
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
.actions
|
|
||||||
= f.submit "Changer", class: 'btn btn-primary'
|
|
||||||
%br
|
|
||||||
|
|
|
@ -1,21 +1,17 @@
|
||||||
= devise_error_messages!
|
- content_for(:title, 'Mot de passe oublié')
|
||||||
|
|
||||||
%br
|
- content_for :footer do
|
||||||
#form-login
|
= render partial: 'root/footer'
|
||||||
%h2#gestionnaire_login Mot de passe oublié
|
|
||||||
|
|
||||||
%br
|
.container.devise-container
|
||||||
%br
|
.one-column-centered
|
||||||
#new-user
|
= devise_error_messages!
|
||||||
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
|
|
||||||
%h4
|
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: 'form' }) do |f|
|
||||||
= f.label :email
|
|
||||||
.input-group
|
%h1 Mot de passe oublié
|
||||||
.input-group-addon
|
|
||||||
%span.fa.fa-user
|
= f.label :email, 'Email'
|
||||||
= f.email_field :email, class: 'form-control', placeholder: 'Email'
|
= f.email_field :email, autofocus: true
|
||||||
%br
|
|
||||||
%br
|
= f.submit 'Réinitialier', class: 'button primary'
|
||||||
.actions
|
|
||||||
= f.submit "Renvoyer", class: 'btn btn-primary'
|
|
||||||
%br
|
|
||||||
|
|
Loading…
Reference in a new issue