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

{% block title %}Log in{% endblock %}

{% block body %}
    <form method="post">
        <h3 class="mb-3">{{ 'Please sign in'|trans }}</h3>
        <div class="mb-3">
            <label for="username" class="form-label">{{ 'Email'|trans }}</label>
            <input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control"
                   autocomplete="email" required autofocus>
        </div>

        <div class="mb-3">
            <label for="password" class="form-label">{{ 'Password'|trans }}</label>
            <input type="password" name="_password" id="password" class="form-control"
                   autocomplete="current-password"
                   required>
        </div>

        <input type="hidden" name="_csrf_token" data-controller="csrf-protection"
               value="{{ csrf_token('authenticate') }}">

        <div class="mb-3 form-check">
            <input type="checkbox" name="_remember_me" id="_remember_me" class="form-check-input" checked>
            <label for="_remember_me" class="form-check-label">{{ 'Remember me'|trans }}</label>
        </div>

        <button class="btn btn-lg btn-primary" type="submit">
            {{ 'Sign in'|trans }}
        </button>
        <a href="{{ path('tvdt_register') }}"
           class="btn btn-link">{{ 'Create an account'|trans }}</a>
        <a href="{{ path('tvdt_forgot_password_request') }}"
           class="btn btn-link">{{ 'Forgot your password?'|trans }}</a>
    </form>
{% endblock %}
