73 lines
3.7 KiB
Twig
73 lines
3.7 KiB
Twig
{% extends 'main/base.html.twig' %}
|
|
|
|
{% block head %}
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
{% block title %}📣 Sortie.com Connexion 🔊{% endblock %}
|
|
{% block stylesheets %}
|
|
{{ encore_entry_link_tags('app') }}
|
|
{% endblock %}
|
|
</head>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="flex flex-col justify-center items-center py-48">
|
|
<div class="bg-white shadow-lg rounded-lg p-8 max-w-sm text-center">
|
|
<h2 class="text-2xl font-bold text-center pb-6">Connectez-vous !</h2>
|
|
<form action="{{ path('app_login') }}" method="post">
|
|
<label class="text-gray-700 font-bold" for="username">Email ou pseudo</label>
|
|
<input class="w-full mb-4 px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Adresse e-mail ou pseudo" type="text" value="{{ last_username }}" name="username" id="username" autocomplete="email" required autofocus>
|
|
|
|
<div class="mb-4">
|
|
<label class="text-gray-700 font-bold" for="password">Mot de passe</label>
|
|
<input class="w-full mb-2 px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Mot de passe" type="password" name="password" id="password" autocomplete="current-password" required>
|
|
<a id="openModal" class="text-blue-500 text-sm hover:underline">Mot de passe oublié ?</a>
|
|
</div>
|
|
|
|
<label>
|
|
<input type="checkbox" name="_remember_me" checked>
|
|
Se souvenir de moi
|
|
</label>
|
|
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
|
|
|
<div class="flex flex-row justify-between">
|
|
<button class="btnPrimary" type="submit">Se connecter</button>
|
|
<a href="{{ path('app_register') }}">
|
|
<button class="btnSecondary" type="button">S'inscrire</button>
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="resetModal" class="fixed inset-0 z-50 hidden bg-gray-900 bg-opacity-50">
|
|
<div class="flex justify-center items-center min-h-screen">
|
|
<div class="bg-white p-6 rounded shadow-md w-1/3">
|
|
<h2 class="text-xl font-semibold mb-4">Mot de passe oublié ?</h2>
|
|
<form id="resetForm" method="POST" action="{{ path('app_password_reset_request') }}">
|
|
<div class="mb-4">
|
|
<label for="email" class="block text-sm font-medium text-gray-700">Votre email</label>
|
|
<input id="email" name="email" type="text" class="mt-1 block w-full px-4 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
|
</div>
|
|
|
|
<div class="flex justify-end">
|
|
<button type="submit" class="btnPrimary">Envoyer</button>
|
|
<button type="button" id="closeModal" class="btnAnnule ml-2">Annuler</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.getElementById('openModal').addEventListener('click', function() {
|
|
document.getElementById('resetModal').classList.remove('hidden');
|
|
});
|
|
|
|
document.getElementById('closeModal').addEventListener('click', function() {
|
|
document.getElementById('resetModal').classList.add('hidden');
|
|
});
|
|
</script>
|
|
</div>
|
|
{% endblock %}
|