{% extends "user-settings.html" %}
{% import '_form_macros.html' as macros %}
{% block settings_content %}
{% if otp_uri %}
{{ _("Scan your new token") }}
{# Only show the QR code when the user is ready, this gives them time to pick up their phone and check noone is looking over their shoulders #}
{{ _("Your new token is ready. Click on the button below to reveal the QR code and scan it.") }}
{{ _("or copy and paste the following token URL if you can't scan the QR code:") }}
{% endif%}
{{ _("Add OTP Token") }}
{% if not tokens %}
{{_("Creating your first OTP token enables two-factor authentication using OTP.")}}
{{_("Once enabled, two-factor authentication cannot be disabled.")}}
{% endif %}
{{ _("OTP Tokens") }}
{{_("Add OTP Token")}}
{% for token in tokens %}
{{token.description if token.description else _('(no name)')}}
{{token.uniqueid}}
{% if not token.disabled %}
{% else %}
{% endif %}
{% else %}
{{ _("You have no OTP tokens") }}
{{ _("Add an OTP token to enable two-factor authentication on your account.") }}
{% endfor %}
{{ otp_notice() if otp_notice is defined and tokens }}
{% endblock %}
{% block scripts %}
{{ super() }}
{% if otp_uri %}
{% endif %}
{# Show the modals if there are form errors #}
{% if addotpform.errors %}
{% endif %}
{% endblock %}