add login by email + feature flag

This commit is contained in:
mcalinghee
2025-03-27 18:00:48 +01:00
parent 8f42fa028b
commit 2fe4752aa4
20 changed files with 188 additions and 14 deletions

View File

@@ -42,9 +42,15 @@ Please see LICENSE in the repository root for full details.
<input type="hidden" name="csrf" value="{{ csrf_token }}" />
{% call(f) field.field(label=_("common.username"), name="username", form_state=form) %}
<input {{ field.attributes(f) }} class="cpd-text-control" type="text" autocomplete="username" autocorrect="off" autocapitalize="off" required />
{% endcall %}
{% if features.login_with_email_allowed %}
{% call(f) field.field(label=_("common.username_or_email"), name="username", form_state=form) %}
<input {{ field.attributes(f) }} class="cpd-text-control" type="text" autocomplete="username" autocorrect="off" autocapitalize="off" required />
{% endcall %}
{% else %}
{% call(f) field.field(label=_("common.username"), name="username", form_state=form) %}
<input {{ field.attributes(f) }} class="cpd-text-control" type="text" autocomplete="username" autocorrect="off" autocapitalize="off" required />
{% endcall %}
{% endif %}
{% if features.password_login %}
{% call(f) field.field(label=_("common.password"), name="password", form_state=form) %}