login.html.twig 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ parent() }} - S'identifier{% endblock %}
  3. {% block titre %}Identification{% endblock %}
  4. {% block body %}
  5. <div class="row">
  6. <div class="col-md-4">
  7. <form method="post">
  8. {% if error %}
  9. <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  10. {% endif %}
  11. <label for="inputUsername" class="sr-only">Login</label>
  12. <div class="input-group mb-3">
  13. <input type="text" value="{{ last_username }}" name="_username" id="inputUsername" class="form-control" placeholder="Login" required autofocus>
  14. </div>
  15. <label for="inputPassword" class="sr-only">Mot de passe</label>
  16. <div class="input-group mb-3">
  17. <input type="password" name="_password" id="inputPassword" class="form-control" placeholder="Mot de passe" required>
  18. </div>
  19. <input type="hidden" name="_csrf_token"
  20. value="{{ csrf_token('authenticate') }}"
  21. >
  22. {#
  23. Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
  24. See https://symfony.com/doc/current/security/remember_me.html
  25. #}
  26. <div class="checkbox mb-3">
  27. <input type="checkbox" name="_remember_me">
  28. <label for="remember_me">Se souvenir de moi</label>
  29. </div>
  30. <button class="btn btn-primary mb-3" type="submit">
  31. Se connecter
  32. </button>
  33. </form>
  34. </div>
  35. </div>
  36. <div class="row">
  37. <div class="hr">
  38. <p>Pas de compte ? <a href="{{ path('security_register') }}">S'enregistrer</a></p>
  39. <p>Mot de passe oublié ? <a href="{{ path('security_envoyertoken') }}">Récupérer mot de passe</a></p>
  40. </div>
  41. </div>
  42. {% endblock %}