{# The multi-factor authentication initialization template. Display a QR-code and the OTP secret. :param secret: The OTP secret. :type secret: :class:`str` :param qr_image: A QR-code image representing the OTP secret. :type qr_image: A base64 encoded :class:`str` #} {% if g.auth and not g.session %} {% extends g.auth.template or 'core/auth/base.html' %} {% else %} {% extends theme('base.html') %} {% endif %} {% import 'macro/flask.html' as flask %} {% import 'macro/form.html' as fui %} {% import 'core/partial/login_field.html' as login_field %} {% block script %} {% endblock %} {% block submenu %} {% if g.session %} {% trans %}Personal information{% endtrans %} {% trans %}Account settings{% endtrans %} {% endif %} {% endblock %} {% block auth_subtitle %}
{{ _("Set up multi-factor authentication.") }}
{% endblock %} {% block auth_content %} {% include 'core/auth/partials/otp_setup_content.html' %} {% call fui.render_form(form, hx_boost="false") %}
{{ login_field.render_field(form.otp, class="autofocus") }}
{% if not g.session %} {% endif %}
{% endcall %} {% endblock %} {% block container %} {% if g.auth and not g.session %} {{ super() }} {% else %}

{% trans %}Set up multi-factor authentication.{% endtrans %}

{% block messages %} {{ flask.messages() }} {% endblock %} {% include 'core/auth/partials/otp_setup_content.html' %}
{% call fui.render_form(form, hx_boost="false") %} {{ login_field.render_field(form.otp, class="autofocus") }}
{% endcall %}
{% endif %} {% endblock %}