style: super admin signin form converted to dsfr
This commit is contained in:
parent
73bffa3acc
commit
21001d7ae0
4 changed files with 22 additions and 20 deletions
|
@ -1,20 +1,22 @@
|
|||
.super-admin.flex.justify-center
|
||||
%div
|
||||
%h2.huge-title Espace Manager
|
||||
.auth-form.sign-in-form
|
||||
.fr-container.fr-my-5w
|
||||
.fr-grid-row.fr-grid-row--center
|
||||
.fr-col-lg-6
|
||||
%h1.fr-h2 Espace Manager
|
||||
= devise_error_messages!
|
||||
|
||||
= form_for SuperAdmin.new, url: super_admin_session_path, html: { class: "form" } do |f|
|
||||
%h1.fr-h2 Connectez-vous
|
||||
= form_for SuperAdmin.new, url: super_admin_session_path do |f|
|
||||
%fieldset.fr-mb-0.fr-fieldset
|
||||
.fr-fieldset__element
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :email, input_type: :email_field, opts: { autocomplete: 'email', autofocus: true })
|
||||
|
||||
= f.label :email, "Email"
|
||||
= 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'
|
||||
.fr-fieldset__element
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :password, input_type: :password_field, opts: { autocomplete: 'current-password' })
|
||||
|
||||
- if SUPER_ADMIN_OTP_ENABLED
|
||||
= f.label :otp_attempt, 'Code OTP (uniquement si vous avez déjà activé 2FA)'
|
||||
= f.text_field :otp_attempt
|
||||
.fr-fieldset__element
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :otp_attempt, input_type: :number_field, opts: { inputmode: :numeric }, required: false)
|
||||
|
||||
%p= link_to "Mot de passe oublié ou réinitialisation 2FA ?", new_super_admin_password_path, class: "link"
|
||||
= f.submit "Se connecter", class: "fr-btn fr-btn--lg"
|
||||
.fr-fieldset__element
|
||||
%p= link_to "Mot de passe oublié ou réinitialisation 2FA ?", new_super_admin_password_path, class: "link"
|
||||
|
||||
= f.submit t('views.users.sessions.new.connection'), class: "fr-btn fr-btn--lg"
|
||||
|
|
|
@ -491,7 +491,6 @@ en:
|
|||
sessions:
|
||||
new:
|
||||
sign_in: Sign in on %{application_name}
|
||||
password: Password (minimum length %{min_length} characters)
|
||||
remember_me: Remember me
|
||||
reset_password: Forgot password?
|
||||
connection: Sign in
|
||||
|
@ -548,6 +547,7 @@ en:
|
|||
<< : *default_attributes
|
||||
super_admin:
|
||||
<< : *default_attributes
|
||||
otp_attempt: 'OTP code (only if you have already activated 2FA)'
|
||||
procedure:
|
||||
zone: This procedure is run by
|
||||
champs:
|
||||
|
|
|
@ -494,7 +494,6 @@ fr:
|
|||
sessions:
|
||||
new:
|
||||
sign_in: Connexion à %{application_name}
|
||||
password: Mot de passe (%{min_length} caractères minimum)
|
||||
remember_me: Se souvenir de moi
|
||||
reset_password: Mot de passe oublié ?
|
||||
connection: Se connecter
|
||||
|
@ -552,6 +551,7 @@ fr:
|
|||
<< : *default_attributes
|
||||
super_admin:
|
||||
<< : *default_attributes
|
||||
otp_attempt: 'Code OTP (uniquement si vous avez déjà activé 2FA)'
|
||||
procedure:
|
||||
zone: La démarche est mise en œuvre par
|
||||
champs:
|
||||
|
|
|
@ -11,7 +11,7 @@ describe 'Managing password:', js: true do
|
|||
click_on 'Mot de passe oublié ?'
|
||||
expect(page).to have_current_path(new_user_password_path)
|
||||
|
||||
fill_in 'Email', with: user.email
|
||||
fill_in 'Adresse électronique', with: user.email
|
||||
perform_enqueued_jobs do
|
||||
click_on 'Demander un nouveau mot de passe'
|
||||
end
|
||||
|
@ -42,7 +42,7 @@ describe 'Managing password:', js: true do
|
|||
click_on 'Mot de passe oublié ?'
|
||||
expect(page).to have_current_path(new_user_password_path)
|
||||
|
||||
fill_in 'Email', with: user.email
|
||||
fill_in 'Adresse électronique', with: user.email
|
||||
perform_enqueued_jobs do
|
||||
click_on 'Demander un nouveau mot de passe'
|
||||
end
|
||||
|
@ -78,7 +78,7 @@ describe 'Managing password:', js: true do
|
|||
click_on 'Mot de passe oublié'
|
||||
expect(page).to have_current_path(new_super_admin_password_path)
|
||||
|
||||
fill_in 'Email', with: super_admin.email
|
||||
fill_in 'Adresse électronique', with: super_admin.email
|
||||
perform_enqueued_jobs do
|
||||
click_on 'Demander un nouveau mot de passe'
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue