Debian Codegraph @

flask_security/templates/security/two_factor_verify_code.html

raw
1 {% set title = title|default(_fsdomain("Two-Factor Authentication")) %}
2 {% extends "security/base.html" %}
3 {% from "security/_macros.html" import render_field_with_errors, render_field, prop_next, render_csrf %}
4
5 {% block content %}
6 {% include "security/_messages.html" %}
7 <h1>{{ _fsdomain("Two-Factor Authentication") }}</h1>
8 <h3>{{ _fsdomain("Please enter your authentication code generated via: %(method)s", method=chosen_method) }}</h3> {# chosen_method is translated string #}
9 <form action="{{ url_for_security('two_factor_token_validation') }}{{ prop_next() }}" method="post" name="two_factor_verify_code_form">
10 {{ two_factor_verify_code_form.hidden_tag() }}
11 {{ render_field_with_errors(two_factor_verify_code_form.code, placeholder=_fsdomain("enter numeric code")) }}
12 {{ render_field(two_factor_verify_code_form.submit) }}
13 </form>
14 {% if two_factor_rescue_form %}
15 <hr class="fs-gap">
16 <form action="{{ url_for_security('two_factor_rescue') }}{{ prop_next() }}" method="post" name="two_factor_rescue_form">
17 {# explicitly render csrf_token so we can change the ID so we don't get duplicates #}
18 {{ render_csrf(two_factor_rescue_form, "rescue") }}
19 {{ render_field_with_errors(two_factor_rescue_form.help_setup) }}
20 {% if problem=="email" %}
21 <div>{{ _fsdomain("The code for authentication was sent to your email address") }}</div>
22 {% endif %}
23 {% if problem=="help" %}
24 <div>{{ _fsdomain("An email was sent to us in order to reset your application account") }}</div>
25 {% endif %}
26 {{ render_field(two_factor_rescue_form.submit) }}
27 </form>
28 {% endif %}
29 {% include "security/_menu.html" %}
30 {% endblock content %}