login.html.twig 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ parent() }} - S'identifier{% endblock %}
  3. {% block titre %}Identification{% endblock %}
  4. {% block body %}
  5. <div class="container">
  6. <div class="row">
  7. <div class="col-md-4">
  8. <form method="post">
  9. {% if error %}
  10. <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  11. {% endif %}
  12. <div class="input-group">
  13. <label for="inputUsername" class="sr-only">Login</label>
  14. <input type="text" value="{{ last_username }}" name="username" id="inputUsername" class="form-control" placeholder="Login" required autofocus>
  15. </div>
  16. <div class="input-group">
  17. <label for="inputPassword" class="sr-only">Mot de passe</label>
  18. <input type="password" name="password" id="inputPassword" class="form-control" placeholder="Mot de passe" required>
  19. </div>
  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. #}
  27. <div class="checkbox mb-3">
  28. <input type="checkbox" name="_remember_me">
  29. <label for="remember_me">Se souvenir de moi</label>
  30. </div>
  31. <button class="btn btn-primary" type="submit">
  32. Se connecter
  33. </button>
  34. </form>
  35. </div>
  36. </div>
  37. <div class="row">
  38. <div class="hr">
  39. <p>Pas de compte ? <a href="{{ path('security_register') }}">S'enregistrer</a></p>
  40. <p>Mot de passe oublié ? <a href="{{ path('security_envoyertoken') }}">Récupérer mot de passe</a></p>
  41. </div>
  42. </div>
  43. </div>
  44. {% endblock %}