{% extends "two_factor/_base.html" %}
{% load future i18n two_factor %}

{% block content %}
<h4>{% block title %}{% trans "Account Security" %}{% endblock %}</h4>

{% if default_device %}
{% if default_device_type == 'TOTPDevice' %}
<p>{% trans "Tokens will be generated by your token generator." %}</p>
{% elif default_device_type == 'PhoneDevice' %}
<p>{% blocktrans with primary=default_device|device_action %}Primary method: {{ primary }}{% endblocktrans %}</p>
{% elif default_device_type == 'RemoteYubikeyDevice' %}
<p>{% blocktrans %}Tokens will be generated by your YubiKey.{% endblocktrans %}</p>
{% endif %}

<h4>{% trans "Backup Tokens" %}</h4>
<p>
    {% blocktrans %}If you don't have any device with you, you can access
    your account using backup tokens.{% endblocktrans %}
    {% blocktrans count counter=backup_tokens %}
    You have only one backup token remaining.
    {% plural %}
    You have {{ counter }} backup tokens remaining.
    {% endblocktrans %}
</p>
<p><a href="{% url 'two_factor:backup_tokens' %}"
      class="button button--primary">{% trans "Show Codes" %}</a></p>

<h4>{% trans "Disable Two-Factor Authentication" %}</h4>
<p>{% blocktrans %}However we strongly discourage you to do so, you can
    also disable two-factor authentication for your account.{% endblocktrans %}</p>
<p><a class="button button--primary" href="{% url 'two_factor:disable' %}">
    {% trans "Disable Two-Factor Authentication" %}</a></p>
{% else %}
<p>{% blocktrans %}Two-factor authentication is not enabled for your
    account. Enable two-factor authentication for enhanced account
    security.{% endblocktrans %}</p>
<p><a href="{% url 'two_factor:setup' %}" class="button button--primary">
    {% trans "Enable Two-Factor Authentication" %}</a>
</p>
{% endif %}
{% endblock %}
