templates/admin/security/forgotten.html.twig line 1

Open in your IDE?
  1. {% extends 'base_logged_off.html.twig' %}
  2. {% block title %}Log in!{% endblock %}
  3. {% block body %}
  4.     <a href="{{ path('app_login') }}" class="pb-login-btn-socials float-right m-3">Sign in</a>
  5.     <a href="{{ path('app_register') }}" class="pb-login-btn-socials float-right m-3">Sign up</a>
  6.     <form method="post" id="pb-login-form" class=" hplogin col-6 offset-3 text-center">
  7.         {% if app.user %}
  8.             <div class="mb-3">
  9.                 {{ 'You are logged in as %username%, will be redirect in few seconds..'|trans({'%username%': app.user.username, 'url_logout': path('app_logout') }) }}
  10.                 <script type="text/javascript">
  11.                   window.location.href = "{{ path('index_loginsuccess') }}";
  12.                 </script>
  13.             </div>
  14.         {% else %}
  15.             <h1 class="login-head-title mb-5">{{ 'Restore your account password'|trans }}</h1>
  16.             {% if error %}
  17.                 <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  18.             {% endif %}
  19.             {{ form_start(forgottenForm, { 'attr': { 'class': 'col-12' } }) }}
  20.                 {{ form_errors(forgottenForm) }}
  21.                 {% if errors|length > 0 %}
  22.                     {% for error in errors %}
  23.                         <div class="alert alert-danger">{{ error.message|trans([], 'security') }}</div>
  24.                     {% endfor %}
  25.                 {% endif %}
  26.                 <fieldset id="register-form-fieldset" class="position-relative">
  27.                     {{ form_widget(forgottenForm.email) }}
  28.                     {{ form_label(forgottenForm.email) }}
  29.                 </fieldset>
  30.                 <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
  31.                 <div class="row">
  32.                     <div class="col-12 text-center mt-5">
  33.                         <button type="submit" class="pg-button">{{ 'Restore password'|trans }}</button>
  34.                     </div>
  35.                 </div>
  36.             {{ form_end(forgottenForm) }}
  37.         {% endif %}
  38.     </form>
  39. {% endblock %}