| 1 |
{% extends "account/base_entrance.html" %} |
| 2 |
{% load i18n %} |
| 3 |
{% load allauth account %} |
| 4 |
{% block head_title %} |
| 5 |
{% trans "Sign In" %} |
| 6 |
{% endblock head_title %} |
| 7 |
{% block content %} |
| 8 |
{% element h1 %} |
| 9 |
{% trans "Sign In" %} |
| 10 |
{% endelement %} |
| 11 |
{% if not SOCIALACCOUNT_ONLY %} |
| 12 |
{% setvar link %} |
| 13 |
<a href="{{ signup_url }}"> |
| 14 |
{% endsetvar %} |
| 15 |
{% setvar end_link %} |
| 16 |
</a> |
| 17 |
{% endsetvar %} |
| 18 |
{% element p %} |
| 19 |
{% blocktranslate %}If you have not created an account yet, then please {{ link }}sign up{{ end_link }} first.{% endblocktranslate %} |
| 20 |
{% endelement %} |
| 21 |
{% url 'account_login' as login_url %} |
| 22 |
{% element form form=form method="post" action=login_url tags="entrance,login" %} |
| 23 |
{% slot body %} |
| 24 |
{% csrf_token %} |
| 25 |
{% element fields form=form unlabeled=True %} |
| 26 |
{% endelement %} |
| 27 |
{{ redirect_field }} |
| 28 |
{% endslot %} |
| 29 |
{% slot actions %} |
| 30 |
{% element button type="submit" tags="prominent,login" %} |
| 31 |
{% trans "Sign In" %} |
| 32 |
{% endelement %} |
| 33 |
{% endslot %} |
| 34 |
{% endelement %} |
| 35 |
{% endif %} |
| 36 |
{% if LOGIN_BY_CODE_ENABLED or PASSKEY_LOGIN_ENABLED %} |
| 37 |
{% element hr %} |
| 38 |
{% endelement %} |
| 39 |
{% element button_group vertical=True %} |
| 40 |
{% if PASSKEY_LOGIN_ENABLED %} |
| 41 |
{% element button type="submit" form="mfa_login" id="passkey_login" tags="prominent,login,outline,primary" %} |
| 42 |
{% trans "Sign in with a passkey" %} |
| 43 |
{% endelement %} |
| 44 |
{% endif %} |
| 45 |
{% if LOGIN_BY_CODE_ENABLED %} |
| 46 |
{% element button href=request_login_code_url tags="prominent,login,outline,primary" %} |
| 47 |
{% trans "Send me a sign-in code" %} |
| 48 |
{% endelement %} |
| 49 |
{% endif %} |
| 50 |
{% endelement %} |
| 51 |
{% endif %} |
| 52 |
{% if SOCIALACCOUNT_ENABLED %} |
| 53 |
{% include "socialaccount/snippets/login.html" with page_layout="entrance" %} |
| 54 |
{% endif %} |
| 55 |
{% endblock content %} |
| 56 |
{% block extra_body %} |
| 57 |
{{ block.super }} |
| 58 |
{% if PASSKEY_LOGIN_ENABLED %} |
| 59 |
{% include "mfa/webauthn/snippets/login_script.html" with button_id="passkey_login" %} |
| 60 |
{% endif %} |
| 61 |
{% endblock %} |