form.html.twig 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {% extends 'PackagistWebBundle::layout.html.twig' %}
  2. {% block content %}
  3. <h2 class="title">Two-Factor Authentication</h2>
  4. <p>This account is protected by two-factor authentication. Please enter your code below to proceed.</p>
  5. <section class="row">
  6. <div class="col-md-6">
  7. {# Authentication errors #}
  8. {% if authenticationError %}
  9. <p class="alert alert-danger">{{ authenticationError|trans(authenticationErrorData, 'SchebTwoFactorBundle') }}</p>
  10. {% endif %}
  11. <form action="{{ path("2fa_login_check") }}" method="post">
  12. <div class="form-group">
  13. <label for="_auth_code">Authentication code:</label>
  14. <div class="input-group">
  15. <input id="_auth_code" class="form-control" type="text" autocomplete="off" name="{{ authCodeParameterName }}" />
  16. <span class="input-group-addon"><span class="icon-key"></span></span>
  17. </div>
  18. </div>
  19. {% if displayTrustedOption %}
  20. <p class="widget"><label for="_trusted"><input id="_trusted" type="checkbox" name="{{ trustedParameterName }}" /> {{ "trusted"|trans({}, 'SchebTwoFactorBundle') }}</label></p>
  21. {% endif %}
  22. <input type="submit" class="btn btn-block btn-primary btn-lg" value="{{ "login"|trans({}, 'SchebTwoFactorBundle') }}" />
  23. {% if isCsrfProtectionEnabled %}
  24. <input type="hidden" name="{{ csrfParameterName }}" value="{{ csrf_token(csrfTokenId) }}">
  25. {% endif %}
  26. </form>
  27. <hr>
  28. {# The logout link gives the user a way out if they can't complete two-factor authentication #}
  29. <a href="{{ logoutPath }}">{{ "cancel"|trans({}, 'SchebTwoFactorBundle') }}</a>
  30. </div>
  31. <div class="clearfix"></div>
  32. </section>
  33. {% endblock %}