{# .. screenshot:: |canaille|/login :align: right :width: 275px The login page. The login page. This page displays a form to get the user identifier. :param form: The login form. :type form: :class:`~canaille.core.endpoints.forms.LoginForm` #} {% extends g.auth.template or 'core/auth/base.html' %} {% import 'macro/flask.html' as flask %} {% import 'macro/form.html' as fui %} {% import 'core/partial/login_field.html' as login_field %} {% block auth_content %} {% if login_history %} {% block login_history %}

{{ _("Choose an account") }}

{% for user in login_history %} {% set is_connected = namespace(value=false) %} {% for session in active_sessions %} {% if session.user.id == user.id %} {% set is_connected.value = true %} {% endif %} {% endfor %}
{% if is_connected.value %}
{% trans %}Connected{% endtrans %}
{% endif %}
{% if is_connected.value %} {% else %} {% endif %}
{% endfor %}
{{ _("Or") }}
{% endblock %} {% endif %}
{% if login_history %}

{{ _("Use another account") }}

{% endif %} {% call fui.render_form(form) %} {% block fields %} {% block login_field scoped %}{{ login_field.render_field(form.login, class="autofocus") }}{% endblock %} {% endblock %} {% block buttons %}
{% if features.has_registration %} {{ _("Create an account") }} {% endif %}
{{ fui.render_field(form.remember, class_="right aligned") }}
{% endblock %} {% endcall %}
{% endblock %}