form.html.twig 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. <div class="form-group">
  21. <div class="checkbox"><label for="_trusted"><input id="_trusted" type="checkbox" name="{{ trustedParameterName }}" /> Trust this computer for 30 days</label></div>
  22. </div>
  23. {% endif %}
  24. <input type="submit" class="btn btn-block btn-primary btn-lg" value="{{ "login"|trans({}, 'SchebTwoFactorBundle') }}" />
  25. {% if isCsrfProtectionEnabled %}
  26. <input type="hidden" name="{{ csrfParameterName }}" value="{{ csrf_token(csrfTokenId) }}">
  27. {% endif %}
  28. </form>
  29. <hr>
  30. {# The logout link gives the user a way out if they can't complete two-factor authentication #}
  31. <a href="{{ logoutPath }}">{{ "cancel"|trans({}, 'SchebTwoFactorBundle') }}</a>
  32. </div>
  33. <div class="clearfix"></div>
  34. </section>
  35. {% endblock %}