login.html.twig 1.9 KB

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