From 732dc7970c14ef9307cd4be700fb810a15005be4 Mon Sep 17 00:00:00 2001 From: Gordnho Date: Fri, 3 Apr 2026 14:50:26 +0200 Subject: [PATCH] Refactor login form to include password input conditionally This removes the username login box when only providers are chosen --- templates/pages/login.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/templates/pages/login.html b/templates/pages/login.html index 57bccd03e..d09402227 100644 --- a/templates/pages/login.html +++ b/templates/pages/login.html @@ -41,7 +41,8 @@ Please see LICENSE files in the repository root for full details. {% endif %} - + + {% if features.password_login %} {% if features.login_with_email_allowed %} {% call(f) field.field(label=_("mas.login.username_or_email"), name="username", form_state=form) %} @@ -51,16 +52,15 @@ Please see LICENSE files in the repository root for full details. {% endcall %} {% endif %} - - {% if features.password_login %} - {% call(f) field.field(label=_("common.password"), name="password", form_state=form) %} - - {% endcall %} - - {% if features.account_recovery %} - {{ button.link_text(text=_("mas.login.forgot_password"), href="/recover", class="self-center") }} - {% endif %} + + {% call(f) field.field(label=_("common.password"), name="password", form_state=form) %} + + {% endcall %} + + {% if features.account_recovery %} + {{ button.link_text(text=_("mas.login.forgot_password"), href="/recover", class="self-center") }} {% endif %} + {% endif %}