{% extends "admin/login.html" %} {% load i18n static two_factor_tags %} {% block extrastyle %} {# Super block already includes {{ form.media }} #} {{ block.super }} {% endblock %} {# Overridden to render django-two-factor-auth's forms #} {% block content %} {% if wizard.form.errors and not wizard.form.non_field_errors %}

{% blocktranslate count counter=wizard.form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}

{% endif %} {% if wizard.form.non_field_errors %} {% for error in wizard.form.non_field_errors %}

{{ error }}

{% endfor %} {% endif %}
{% if user.is_authenticated %} {% block autherrornote %}

{% blocktranslate trimmed with username=request.user.get_username %} You are authenticated as {{ username }}, but are not authorized to access this page. Would you like to login to a different account? {% endblocktranslate %}

{% endblock %} {% endif %} {% if wizard.steps.current == 'token' %} {% if device.method == 'call' %}

{% blocktrans trimmed %}We are calling your phone right now, please enter the digits you hear.{% endblocktrans %}

{% elif device.method == 'sms' %}

{% blocktrans trimmed %}We sent you a text message, please enter the tokens we sent.{% endblocktrans %}

{% else %}

{% blocktrans trimmed %}Please enter the tokens generated by your token generator.{% endblocktrans %}

{% endif %} {% elif wizard.steps.current == 'backup' %}

{% blocktrans trimmed %}Use this form for entering backup tokens for logging in. These tokens have been generated for you to print and keep safe. Please enter one of these backup tokens to login to your account.{% endblocktrans %}

{% endif %}
{% csrf_token %} {% if wizard.steps.current == 'auth' %} {{ wizard.management_form }}
{{ form.username.errors }} {{ form.username.label_tag }} {{ form.username }}
{{ form.password.errors }} {{ form.password.label_tag }} {{ form.password }}
{% else %} {% include "maykin_2fa/includes/wizard_form.html" %} {% endif %} {% url 'admin_password_reset' as password_reset_url %} {% if password_reset_url and wizard.steps.current == 'auth' %} {% endif %} {# hidden submit button to enable [enter] key, otherwise the 'back' button is used #}
{% include "maykin_2fa/includes/wizard_actions.html" %}
{# Can be used by downstream projects to add SSO options etc. #} {% block extra_login_options %}{% endblock %} {% block recovery_options %} {% if backup_tokens %}

{% trans "Unable to verify with your device?" %}

{% endif %} {% endblock %}
{% endblock %}