login-twofa.html.twig 1.1 KB

12345678910111213141516171819202122
  1. {% set form = forms('login-twofa') %}
  2. {% set client_side_validation = form.client_side_validation is not null ? form.client_side_validation : config.plugins.form.client_side_validation|default(true) %}
  3. {% set inline_errors = form.inline_errors is not null ? form.inline_errors : config.plugins.form.inline_errors(false) %}
  4. <form method="post" action="{{ (base_url_relative ~ uri.path)|e }}" class="{{ form_outer_classes }}">
  5. {% for field in form.fields %}
  6. {% if field.type %}
  7. <div>
  8. {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
  9. </div>
  10. {% endif %}
  11. {% endfor %}
  12. {{ nonce_field('login-form', 'login-form-nonce')|raw }}
  13. <div class="{{ form_button_outer_classes ?: 'form-actions secondary-accent' }}">
  14. <div class="form-actions primary-accent">
  15. <button type="submit" class="button" name="task" value="login.logout">{{ 'PLUGIN_LOGIN.BTN_CANCEL'|t }}</button>
  16. <button type="submit" class="button primary" name="task" value="login.twofa">{{ 'PLUGIN_LOGIN.BTN_LOGIN'|t }}</button>
  17. </div>
  18. </div>
  19. </form>