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
|
||||
layout "new_application"
|
||||
|
||||
after_action :try_to_authenticate_gestionnaire, 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
|
||||
%h2#gestionnaire_login Changement de mot de passe
|
||||
- content_for :footer do
|
||||
= 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
|
||||
%h4
|
||||
= f.label 'Nouveau mot de passe'
|
||||
|
||||
.input-group
|
||||
.input-group-addon
|
||||
%span.fa.fa-asterisk
|
||||
= f.password_field :password, autofocus: true, autocomplete: "off", class: 'form-control'
|
||||
%br
|
||||
%h4
|
||||
= f.label 'Retaper le mot de passe'
|
||||
.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
|
||||
= f.label 'Nouveau mot de passe'
|
||||
= f.password_field :password, autofocus: true, autocomplete: 'off'
|
||||
|
||||
= f.label 'Confirmez le nouveau mot de passe'
|
||||
= f.password_field :password_confirmation, autocomplete: 'off'
|
||||
|
||||
= f.submit 'Changer le mot de passe', class: 'button primary'
|
||||
|
|
|
@ -1,21 +1,17 @@
|
|||
= devise_error_messages!
|
||||
- content_for(:title, 'Mot de passe oublié')
|
||||
|
||||
%br
|
||||
#form-login
|
||||
%h2#gestionnaire_login Mot de passe oublié
|
||||
- content_for :footer do
|
||||
= render partial: 'root/footer'
|
||||
|
||||
%br
|
||||
%br
|
||||
#new-user
|
||||
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
|
||||
%h4
|
||||
= f.label :email
|
||||
.input-group
|
||||
.input-group-addon
|
||||
%span.fa.fa-user
|
||||
= f.email_field :email, class: 'form-control', placeholder: 'Email'
|
||||
%br
|
||||
%br
|
||||
.actions
|
||||
= f.submit "Renvoyer", class: 'btn btn-primary'
|
||||
%br
|
||||
.container.devise-container
|
||||
.one-column-centered
|
||||
= devise_error_messages!
|
||||
|
||||
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: 'form' }) do |f|
|
||||
|
||||
%h1 Mot de passe oublié
|
||||
|
||||
= f.label :email, 'Email'
|
||||
= f.email_field :email, autofocus: true
|
||||
|
||||
= f.submit 'Réinitialier', class: 'button primary'
|
||||
|
|
Loading…
Reference in a new issue