fix refacto super_admin
This commit is contained in:
parent
5fbc975f6a
commit
0e43b5e5c0
7 changed files with 5 additions and 5 deletions
6
app/views/super_admins/edit_otp.html.haml
Normal file
6
app/views/super_admins/edit_otp.html.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
.super-admin.flex.justify-center
|
||||
%div
|
||||
%h2.huge-title Espace Manager
|
||||
%p Munissez-vous de votre téléphone sur lequel vous avez installé une application cliente 2FA (Google Authenticator, Authy, AndOTP, ...)
|
||||
%br
|
||||
%p= link_to "Activer l'authentification double-facteur", enable_super_admin_otp_path, method: :put, class: 'button primary'
|
12
app/views/super_admins/enable_otp.html.haml
Normal file
12
app/views/super_admins/enable_otp.html.haml
Normal file
|
@ -0,0 +1,12 @@
|
|||
.container
|
||||
%p
|
||||
%strong Si vous n'effectuez pas cette étape maintenant, vous ne pourrez plus vous connecter au manager !
|
||||
%p Depuis votre téléphone, lancez votre application cliente 2FA et scannez ce QRCode afin d'ajouter votre compte DSManager. Votre application vous fournira ensuite à chaque connexion au manager le code otp à saisir.
|
||||
%br
|
||||
= raw @qrcode.as_svg(module_size: 6)
|
||||
|
||||
%br
|
||||
|
||||
%p
|
||||
Après avoir scanné le QRCode ci-dessus, nous vous invitons à
|
||||
= link_to 'accéder au Manager' , manager_root_path
|
22
app/views/super_admins/passwords/edit.html.haml
Normal file
22
app/views/super_admins/passwords/edit.html.haml
Normal file
|
@ -0,0 +1,22 @@
|
|||
- content_for(:title, '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
|
||||
|
||||
= f.hidden_field :reset_password_token
|
||||
|
||||
= 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'
|
17
app/views/super_admins/passwords/new.html.haml
Normal file
17
app/views/super_admins/passwords/new.html.haml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- content_for(:title, 'Mot de passe oublié')
|
||||
|
||||
- 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: { class: 'form' }) do |f|
|
||||
|
||||
%h1 Mot de passe oublié
|
||||
|
||||
= f.label :email, 'Email'
|
||||
= f.email_field :email, autofocus: true
|
||||
|
||||
= f.submit 'Réinitialiser', class: 'button primary'
|
21
app/views/super_admins/sessions/new.html.haml
Normal file
21
app/views/super_admins/sessions/new.html.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
.super-admin.flex.justify-center
|
||||
%div
|
||||
%h2.huge-title Espace Manager
|
||||
.auth-form.sign-in-form
|
||||
|
||||
= form_for SuperAdmin.new, url: super_admin_session_path, html: { class: "form" } do |f|
|
||||
%h1 Connectez-vous
|
||||
|
||||
= f.label :email, "Email (nom@site.com)"
|
||||
= f.text_field :email, type: :email, autocomplete: 'username', autofocus: true
|
||||
|
||||
= f.label :password, "Mot de passe (#{PASSWORD_MIN_LENGTH} caractères minimum)"
|
||||
= f.password_field :password, autocomplete: 'current-password'
|
||||
|
||||
= f.label :otp_attempt, 'Code OTP (uniquement si vous avez déjà activé 2FA)'
|
||||
= f.text_field :otp_attempt
|
||||
|
||||
.auth-options
|
||||
.text-right
|
||||
= link_to "Mot de passe oublié ou réinitialisation 2FA ?", new_super_admin_password_path, class: "link"
|
||||
= f.submit "Se connecter", class: "button large primary expand"
|
Loading…
Add table
Add a link
Reference in a new issue