{% extends "allauth/layouts/entrance.html" %} {% load i18n socialaccount %} {% comment %} Themis override of allauth's login page. allauth's bundled login renders bare, unstyled inputs/buttons via its element macros; this version renders the same Django `form` with DaisyUI styling inside the themed auth card (see allauth/layouts/base.html). SSO is offered first when Casdoor is enabled; the local email/password form is gated on ALLOW_LOCAL_LOGIN (both flags come from themis.context_processors.themis_settings). {% endcomment %} {% block head_title %}{% trans "Sign In" %}{% endblock %} {% block content %}

{% trans "Sign In" %}

{% if CASDOOR_ENABLED %} {% get_providers as socialaccount_providers %} {% for provider in socialaccount_providers %} {% provider_login_url provider process="login" as provider_url %} {% blocktrans with name=provider.name %}Sign in with {{ name }}{% endblocktrans %} {% endfor %} {% endif %} {% if CASDOOR_ENABLED and ALLOW_LOCAL_LOGIN %}
{% trans "or" %}
{% endif %} {% if ALLOW_LOCAL_LOGIN %}
{% csrf_token %} {% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %} {% for field in form.visible_fields %}
{{ field }} {% if field.errors %} {{ field.errors|striptags }} {% endif %}
{% endfor %} {% for field in form.hidden_fields %}{{ field }}{% endfor %} {{ redirect_field }}

{% url 'account_reset_password' as reset_url %} {% trans "Forgot your password?" %}

{% endif %} {% if not ALLOW_LOCAL_LOGIN and not CASDOOR_ENABLED %}
{% trans "No sign-in method is configured." %}
{% endif %}
{% endblock %}