{% import 'macros/forms.html' as forms with context %} {% block content %}

{{ _("Two-factor authentication adds an extra layer of security to your account") }}

{{ _("In addition to your username and password, you'll need to use a code.") }}

{{ two_factor_setup_form.hidden_tag() }}
{{ _("Currently setup two-factor method: %(method)s", method=primary_method) }}

{% for subfield in two_factor_setup_form.setup %} {% if subfield.data in choices %} {{ forms.field(subfield) }} {% endif %} {% endfor %} {{ forms.field(two_factor_setup_form.submit) }} {% if chosen_method=="email" and chosen_method in choices %}
{{ _("To complete logging in, please enter the code sent to your mail") }}
{% endif %} {% if chosen_method=="authenticator" and chosen_method in choices %}
{{ _("Open an authenticator app on your device and scan the following QRcode (or enter the code below manually) to start receiving codes:") }}
{{ _('Two factor authentication code') }}
{{ authr_key }}
{% endif %} {% if chosen_method=="sms" and chosen_method in choices %}

{{ _("To Which Phone Number Should We Send Code To?") }}

{{ two_factor_setup_form.hidden_tag() }} {{ forms.field(two_factor_setup_form.phone) }} {{ forms.field(two_factor_setup_form.submit) }} {% endif %}
{% if chosen_method %} {# Hide this when first setting up #}
{{ two_factor_verify_code_form.hidden_tag() }} {{ forms.field(two_factor_verify_code_form.code) }} {{ forms.field(two_factor_verify_code_form.submit) }}
{% endif %} {% if config.SECURITY_MULTI_FACTOR_RECOVERY_CODES %}

{{ _("Recovery Codes") }}

{{ _("This application supports setting up recovery codes.") }} {{ _("You can set them up here.") }}
{% endif %} {% endblock content %}