{% embed 'partials/login.html.twig' with {title:'Grav 2-Factor Authentication', redirect: admin.session.redirect} %}

{% block integration %}
{% endblock %}

{% block form %}

    {% set form = forms['login-twofa'] %}

    {% for field in form.fields %}
        {% if field.type %}
            <div>
                {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
            </div>
        {% endif %}
    {% endfor %}

    <div class="{{ form_button_outer_classes ?: 'form-actions primary-accent' }}">
        <div class="form-actions primary-accent">
            <button type="submit" class="button primary" name="task" value="twofa"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_LOGIN.BTN_LOGIN'|t }}</button>
        </div>
    </div>

{% endblock %}

{% endembed %}
