demarches-normaliennes/app/views/super_admins/sessions/new.html.haml
Christophe Robillard 6af01077b6 disable 2FA according to config
2FA is disabled for superadmin unless `SUPER_ADMIN_OTP_ENABLED` is equal
to `enabled` (default value)
2023-03-02 13:47:48 +01:00

20 lines
859 B
Text

.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.fr-h2 Connectez-vous
= 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'
- if SUPER_ADMIN_OTP_ENABLED
= f.label :otp_attempt, 'Code OTP (uniquement si vous avez déjà activé 2FA)'
= f.text_field :otp_attempt
%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"