{% extends 'layout/login.html.twig' %}

{% block title %}Iniciar sesión{% endblock %}

{% block body %}
    <div class="row justify-content-center mt-5">
        <div class="col-xl-5 col-lg-6 col-md-8 col-sm-11">

            <div class="user-login-form card shadow-lg border-0 rounded-lg my-5">
                <div class="card-header">
                    <img src="{{ asset('img/logo.png') }}" alt="" class="img-fluid">
                </div>
                <div class="card-body p-5">
                    <form method="post">

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

                        <div class="form-group">
                            <label for="inputUsername">Email</label>
                            <input type="email" value="{{ last_username }}" name="_username" id="inputUsername"
                                   class="form-control" required autofocus>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword">Contraseña</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="checkbox mb-3">
                            <label>
                                <input type="checkbox" name="_remember_me" checked> Recuérdame en este dispositivo
                            </label>
                        </div>

                        <button class="btn btn-block btn-primary" type="submit">
                            Iniciar sesión
                        </button>
                    </form>
                </div>
            </div>

        </div>
    </div>

{% endblock %}
