templates/security/login.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Log in!{% endblock %}
  3. {% block body %}
  4. <div class="d-flex flex-column p-2 justify-content-center align-items-center">
  5.     <form method="post" class="mt-auto">
  6.         <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  7.         {% if error %}
  8.             <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  9.         {% endif %}
  10.         {% if app.user %}
  11.             <div class="mb-3">
  12.                 You are logged in as {{ app.user.username }}, <a href="{{ path('app_logout') }}">Logout</a>
  13.             </div>
  14.         {% endif %}
  15.         <h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
  16.         <label for="inputEmail">Email</label>
  17.         <input type="email" value="{{ last_username }}" name="email" id="inputEmail" class="form-control" required autofocus>
  18.         <label for="inputPassword">Password</label>
  19.         <input type="password" name="password" id="inputPassword" class="form-control" required>
  20.         <input type="hidden" name="_csrf_token"
  21.             value="{{ csrf_token('authenticate') }}"
  22.         >
  23.         {#
  24.             Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
  25.             See https://symfony.com/doc/current/security/remember_me.html
  26.             <div class="checkbox mb-3">
  27.                 <label>
  28.                     <input type="checkbox" name="_remember_me"> Remember me
  29.                 </label>
  30.             </div>
  31.         #}
  32.         <div class="d-flex justify-content-center">
  33.             <button class=" btn btn-primary mt-2" type="submit">
  34.                 Sign in
  35.             </button>
  36.         </div>
  37.         <div class="d-flex justify-content-center">
  38.             <a href="{{ path('app_forgot_password_request') }}">Reset Password</a>
  39.         </div>
  40.     </form>
  41. </div>
  42. {% endblock %}