{% extends 'base.html.twig' %}

{# ... #}

{% block main %}
<div class="card mt-5 text-center">
    {% if error %}
        <div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
    {% endif %}

    <form action="{{ path('app_login') }}" method="post">
    <div class="form-outline mb-4 mt-2">
        <h1>Connexion</h1>
        <label for="username" class="mt-5">Email :</label>
        <input type="text" id="username" name="_username" value="{{ last_username }}"/>
     </div>
     <div class="form-outline mb-4">
        <label for="password">Mot de passe : </label>
        <input type="password" id="password" name="_password"/>
     </div>
        {# If you want to control the URL the user is redirected to on success
        <input type="hidden" name="_target_path" value="/account"/> #}

     <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">

        <button type="submit" class="btn btn-primary btn-block mb-4">Se Connecter</button>
    </form>
</div>
{% endblock %}
