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

{% block title %}Log In!{% endblock %}

{% block body %}
<div class="container">
    <div class="row">
        <div class="login-form bg-light mt-4 p-4">
            <form method="post" class="row g-3">
                <h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>

                {% if error %}
                    <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
                {% endif %}

                <div class="col-12">
                    <label for="inputEmail">Email</label>
                    <input type="email" name="email" id="inputEmail" class="form-control" value="{{ last_username }}" required autofocus>
                </div>
                <div class="col-12">
                    <label for="inputPassword">Password</label>
                    <input type="password" name="password" id="inputPassword" class="form-control" required>
                </div>

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

                <div class="col-12">
                    <button class="btn btn-lg btn-primary float-end" type="submit">
                        Sign in
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
{% endblock %}
