templates/security/login.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Log in!
  3. {% endblock %}
  4. {% block body %}
  5.     <div class="container col-md-3">
  6.         <form method="post">
  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
  13.                     {{ app.user.userIdentifier }},
  14.                     <a href="{{ path('app_logout') }}">Déconnexion</a>
  15.                 </div>
  16.             {% endif %}
  17.             <div class="d-flex flex-row justify-content-center m-5">
  18.                 <h2>Connexion</h2>
  19.             </div>
  20.             <label for="inputUsername">Nom d'utilisateur</label>
  21.             <input type="text" value="{{ last_username }}" name="username" id="inputUsername" class="form-control" autocomplete="username" required autofocus>
  22.             <label for="inputPassword">Mot de passe</label>
  23.             <input type="password" name="password" id="inputPassword" class="form-control" autocomplete="current-password" required>
  24.             <input
  25.             type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  26.             {#
  27.                                             Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
  28.                                             See https://symfony.com/doc/current/security/remember_me.html
  29.                                     
  30.                                             <div class="checkbox mb-3">
  31.                                                 <label>
  32.                                                     <input type="checkbox" name="_remember_me"> Remember me
  33.                                                 </label>
  34.                                             </div>
  35.                                         #}
  36.             <br>
  37.             <button class="btn btn-primary" type="submit">
  38.                 Connexion
  39.             </button>
  40.             <a href = "{{ path('app_registration')}}" class="btn" type="submit">
  41.                 Registration
  42.             
  43.             </a>
  44.         </form>
  45.     </div>
  46. {% endblock %}