{% extends 'base.html.twig' %}
{% block title %}Log in!
{% endblock %}
{% block body %}
<div class="container col-md-3">
<form method="post">
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
{% if app.user %}
<div class="mb-3">
You are logged in as
{{ app.user.userIdentifier }},
<a href="{{ path('app_logout') }}">Déconnexion</a>
</div>
{% endif %}
<div class="d-flex flex-row justify-content-center m-5">
<h2>Connexion</h2>
</div>
<label for="inputUsername">Nom d'utilisateur</label>
<input type="text" value="{{ last_username }}" name="username" id="inputUsername" class="form-control" autocomplete="username" required autofocus>
<label for="inputPassword">Mot de passe</label>
<input type="password" name="password" id="inputPassword" class="form-control" autocomplete="current-password" required>
<input
type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
{#
Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
See https://symfony.com/doc/current/security/remember_me.html
<div class="checkbox mb-3">
<label>
<input type="checkbox" name="_remember_me"> Remember me
</label>
</div>
#}
<br>
<button class="btn btn-primary" type="submit">
Connexion
</button>
<a href = "{{ path('app_registration')}}" class="btn" type="submit">
Registration
</a>
</form>
</div>
{% endblock %}