2018-12-02 12:43:05 +01:00
|
|
|
{# Override `vendor/scheb/two-factor-bundle/Resources/views/Authentication/form.html.twig` #}
|
2022-05-30 13:40:26 +02:00
|
|
|
{% extends "FOSUserBundle::layout.html.twig" %}
|
2015-10-13 22:43:15 +02:00
|
|
|
|
|
|
|
{% block fos_user_content %}
|
2018-12-02 12:43:05 +01:00
|
|
|
<form class="form" action="{{ path("2fa_login_check") }}" method="post">
|
2015-10-13 22:43:15 +02:00
|
|
|
<div class="card-content">
|
|
|
|
<div class="row">
|
|
|
|
|
2022-05-03 23:28:20 +02:00
|
|
|
{% for flash_message in app.session.flashbag.get("two_factor") %}
|
|
|
|
<p class="error">{{ flash_message|trans }}</p>
|
2015-10-13 22:43:15 +02:00
|
|
|
{% endfor %}
|
|
|
|
|
2018-12-02 12:43:05 +01:00
|
|
|
{# Authentication errors #}
|
|
|
|
{% if authenticationError %}
|
2019-09-30 11:46:08 +02:00
|
|
|
<p class="error">{{ authenticationError|trans(authenticationErrorData, 'SchebTwoFactorBundle') }}</p>
|
2018-12-02 12:43:05 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2015-10-13 22:43:15 +02:00
|
|
|
<div class="input-field col s12">
|
2019-07-26 13:22:48 +02:00
|
|
|
<label for="_auth_code">{{ "auth_code"|trans({}, 'SchebTwoFactorBundle') }}</label>
|
2018-12-02 12:43:05 +01:00
|
|
|
<input id="_auth_code" type="text" autocomplete="off" name="{{ authCodeParameterName }}" />
|
2015-10-13 22:43:15 +02:00
|
|
|
</div>
|
|
|
|
|
2018-12-02 12:43:05 +01:00
|
|
|
{% if displayTrustedOption %}
|
2015-10-13 22:43:15 +02:00
|
|
|
<div class="input-field col s12">
|
2018-12-02 12:43:05 +01:00
|
|
|
<input id="_trusted" type="checkbox" name="{{ trustedParameterName }}" />
|
2019-07-26 13:22:48 +02:00
|
|
|
<label for="_trusted">{{ "trusted"|trans({}, 'SchebTwoFactorBundle') }}</label>
|
2015-10-13 22:43:15 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card-action center">
|
2016-03-08 17:02:34 +01:00
|
|
|
<a href="{{ path('fos_user_security_logout') }}" class="waves-effect waves-light grey btn">{{ 'security.login.cancel'|trans }}</a>
|
2015-10-13 22:43:15 +02:00
|
|
|
<button class="btn waves-effect waves-light" type="submit" name="send">
|
2019-07-26 13:22:48 +02:00
|
|
|
{{ "login"|trans({}, 'SchebTwoFactorBundle') }}
|
2016-03-08 17:02:34 +01:00
|
|
|
<i class="material-icons right">send</i>
|
2015-10-13 22:43:15 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|