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

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

{% block body %}
    <div class="container box">
        <div class="row">
            <div class="login-form bg-dark 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 is defined %}
                        error
                        <div class="alert-dark alert-danger">
{#  {{ error.messageKey|trans(error.messageData, 'security') }} # #}
                        </div>
                    {% endif %}

                    <div class="col-12">
                        <label for="inputEmail">Username or eMail</label>
                        <input type="text" name="username" id="inputUsername" 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>
                    <div class="form-check mb-3">
                        <label>
                            <input type="checkbox" name="_remember_me" class="form-check-input">Remember me
                        </label>
                    </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 %}
