From ecc8c46b964f09b2d536edd045a7880fe07cc313 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 10 Jun 2026 10:42:41 +0200 Subject: [PATCH] Fix template formatting & update translations --- templates/pages/login.html | 36 ++++++++++++++++++------------------ translations/en.json | 4 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/templates/pages/login.html b/templates/pages/login.html index d09402227..5b9cf5e36 100644 --- a/templates/pages/login.html +++ b/templates/pages/login.html @@ -41,26 +41,26 @@ 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) %} - - {% endcall %} - {% else %} - {% call(f) field.field(label=_("common.username"), name="username", form_state=form) %} - + + {% 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) %} + + {% endcall %} + {% else %} + {% call(f) field.field(label=_("common.username"), name="username", form_state=form) %} + + {% endcall %} + {% 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 %} - - {% 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 %}
diff --git a/translations/en.json b/translations/en.json index a24e1a74c..be76affb2 100644 --- a/translations/en.json +++ b/translations/en.json @@ -99,7 +99,7 @@ }, "username": "Username", "@username": { - "context": "pages/login.html:50:37-57, pages/register/index.html:30:35-55, pages/register/password.html:34:33-53, pages/upstream_oauth2/do_register.html:101:35-55, pages/upstream_oauth2/do_register.html:107:39-59" + "context": "pages/login.html:51:39-59, pages/register/index.html:30:35-55, pages/register/password.html:34:33-53, pages/upstream_oauth2/do_register.html:101:35-55, pages/upstream_oauth2/do_register.html:107:39-59" } }, "error": { @@ -489,7 +489,7 @@ }, "username_or_email": "Username or Email", "@username_or_email": { - "context": "pages/login.html:46:37-69" + "context": "pages/login.html:47:39-71" } }, "navbar": {