{% extends 'base.html.twig' %}
{% block title %}- Connexion{% endblock %}
{%block menu%}
{%endblock%}
{% block body %}
<main>
<!-- Section -->
<section class="min-vh-100 d-flex align-items-center section-image overlay-soft-dark py-5 py-lg-0" data-background="{{ asset('assets/img/cards-3662554_1920.jpg') }}">
<div class="container">
<div class="row justify-content-center">
<div class="col-12">
<div class="text-center text-md-center mb-5 mt-md-0 text-white">
<h1 class="mb-0 h3">Connexion</h1>
</div>
</div>
<div class="col-12 d-flex align-items-center justify-content-center">
<div class="signin-inner mt-3 mt-lg-0 bg-white shadow-soft border rounded border-light p-4 p-lg-5 w-100 fmxw-500">
<span class="clearfix"></span>
<form method="post" name="login" onsubmit="return onloginsubmit(event);">
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
{% if app.user %}
<div class="mb-3">
Vous êtes déjà connecté:<br /> {{ app.user.username }} <br />
<a href="{{ path('app_logout') }}">Déconnecter</a>
</div>
{% endif %}
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="far fa-user"></i></span>
</div>
<input type="email" class="form-control" id="input-email" name="email" placeholder="Email" value="{{ last_username }}" required>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-unlock-alt"></i></span>
</div>
<input class="form-control" placeholder="Mot de passe" name="password" type="password" required>
</div>
</div>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<div class="form-check mb-3">
<input class="form-check-input" id="remember" type="checkbox">
<label class="form-check-label" for="remember">
Se souvenir de moi
</label>
</div>
<div class="mt-4">
<input type="hidden" id="login_recaptchatoken" name="login_recaptchatoken" required='false' />
<button type="submit" class="btn btn-block btn-primary animate-up-2">Connexion</button>
</div>
</form>
<div class="d-flex justify-content-between align-items-center mt-4">
<span>
<small>Vous n'avez pas de compte?</small>
<a href="{{ path('home_route', {'routename':'signup'}, relative = false) }}" class="small font-weight-bold">Créer</a>
</span>
<div><a href="{{ path('app_resetpassword', {}, relative = false) }}" class="small text-right">Mot de passe oublié?</a></div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Recaptcha -->
<script src="https://www.google.com/recaptcha/api.js?render=6Le2aesUAAAAAG4fDNIF_lqShoh6-PvS2lHexW2K"></script>
<script src="{{ asset('/assets/js/recaptcha.js') }}"></script>
{% endblock %}