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