diff --git a/modoboa/core/views/auth.py b/modoboa/core/views/auth.py index e1c4ed06c..d9eaa157e 100644 --- a/modoboa/core/views/auth.py +++ b/modoboa/core/views/auth.py @@ -276,6 +276,9 @@ class TwoFactorCodeVerifyView(LoginViewMixin, generic.FormView): has_totp_device = django_otp.user_has_device(self.user) context["totp_device"] = has_totp_device context["webauthn_device"] = self.user.webauthn_enabled + context["show_method_selection"] = ( + has_totp_device and self.user.webauthn_enabled + ) context["nextlocation"] = self.request.POST.get( "next", self.request.GET.get("next") ) diff --git a/modoboa/templates/registration/login.html b/modoboa/templates/registration/login.html index e9061d3aa..c93b3bf76 100644 --- a/modoboa/templates/registration/login.html +++ b/modoboa/templates/registration/login.html @@ -44,11 +44,14 @@ {% block extra_js %} {% endblock %} diff --git a/modoboa/templates/registration/password_reset_confirm.html b/modoboa/templates/registration/password_reset_confirm.html index de3f83f71..6a0c0aa5b 100644 --- a/modoboa/templates/registration/password_reset_confirm.html +++ b/modoboa/templates/registration/password_reset_confirm.html @@ -12,6 +12,7 @@ {% render_field form.new_password1 %}
+ {{ form.new_password2 }} {% if form.new_password2.errors %}

diff --git a/modoboa/templates/registration/password_reset_confirm_code.html b/modoboa/templates/registration/password_reset_confirm_code.html index f426089bd..671ebf882 100644 --- a/modoboa/templates/registration/password_reset_confirm_code.html +++ b/modoboa/templates/registration/password_reset_confirm_code.html @@ -25,9 +25,11 @@

- - {% trans "Resend code" %} - + @@ -35,14 +37,13 @@ {% block extra_js %} {% endblock %} diff --git a/modoboa/templates/registration/twofactor_code_verify.html b/modoboa/templates/registration/twofactor_code_verify.html index b052c00dd..41bb8a9f7 100644 --- a/modoboa/templates/registration/twofactor_code_verify.html +++ b/modoboa/templates/registration/twofactor_code_verify.html @@ -9,15 +9,17 @@ {% block main_content %}

{% translate "Verification" %}

-
- {% if totp_device %} - - {% endif %} - {% if webauthn_device %} - - {% endif %} -
- - {% endblock %}