{% extends "@AutoAdminAdmin/security_layout.html.twig" %}

{% block body %}
  <div class="container">
    <div class="row justify-content-center">
      <div class="col-xl-6 col-lg-8 col-md-10">
        <div class="card o-hidden border-0 shadow-lg mt-5 mb-2">
          <div class="card-body p-0">
            <div class="row">
              <div class="col-12">
                <div class="p-5 text-center">
                  <img class="col-4 pb-4"
                       src="{{ asset('/bundles/autoadmin/front/images/gda-logo.png') }}"
                       alt="GDA logo"
                       loading="lazy"
                  />
                  <form class="user" method="post">

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

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

                    <div class="form-group">
                      <input
                        type="text"
                        class="form-control form-control-user"
                        id="username"
                        name="_username"
                        value="{{ last_username }}"
                        placeholder="Nom d'utilisateur"
                      />
                    </div>

                    <div class="form-group">
                      <input
                        type="password"
                        class="form-control form-control-user"
                        id="password"
                        name="_password"
                        placeholder="Mot de passe"
                      />
                    </div>

                    <button type="submit" class="btn btn-primary btn-user btn-block">Login</button>
                  </form>
                  <hr>
                  <div class="text-center">
                    <a class="small" href="{{ path('aa_admin_password_reset') }}">Mot de passe oublié ?</a>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <p><a href="/">Retour</a></p>
      </div>
    </div>
  </div>
{% endblock %}