templates/security/login.html.twig line 1

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