{% extends "base.html" %}
{% load i18n %}

{% block main_content %}
<div class="new-narrow-panel">
    <h2 class="hd">{% trans "Account Security" %}</h2>

    <div class="con">
  {% if default_device %}
    {% if default_device_type == 'TOTPDevice' %}
      <p>{% trans "Tokens will be generated by your token generator." %}</p>
    {% endif %}

    <h3>{% trans "Backup Tokens" %}</h3>
    <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="sf-btn-link">{% trans "Show Codes" %}</a></p>

    <h3>{% trans "Disable Two-Factor Authentication" %}</h3>
    <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="sf-btn-link" 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>
    <a href="{% url 'two_factor:setup' %}" class="sf-btn-link">{% trans "Enable Two-Factor Authentication" %}</a>
  {% endif %}
    </div>
</div>
{% endblock %}
