74 lines
3.6 KiB
Twig
74 lines
3.6 KiB
Twig
{# templates/registration/register.html.twig #}
|
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Inscription{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="min-h-screen flex items-center justify-center bg-gray-100">
|
|
<div class="max-w-lg w-full p-6 bg-white rounded-lg shadow-md">
|
|
<h2 class="text-2xl font-semibold text-center text-gray-700 mb-6">Créer un compte</h2>
|
|
|
|
{{ form_start(form) }}
|
|
|
|
<div class="mb-4">
|
|
{{ form_label(form.email, 'Email', {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}}) }}
|
|
<div class="mt-1">
|
|
{{ form_widget(form.email, {'attr': {'class': 'w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm'}}) }}
|
|
</div>
|
|
{{ form_errors(form.email) }}
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
{{ form_label(form.password, 'Mot de passe', {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}}) }}
|
|
<div class="mt-1">
|
|
{{ form_widget(form.password, {'attr': {'class': 'w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm'}}) }}
|
|
</div>
|
|
{{ form_errors(form.password) }}
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
{{ form_label(form.pseudo, 'Pseudo', {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}}) }}
|
|
<div class="mt-1">
|
|
{{ form_widget(form.pseudo, {'attr': {'class': 'w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm'}}) }}
|
|
</div>
|
|
{{ form_errors(form.pseudo) }}
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
{{ form_label(form.firstname, 'Prénom', {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}}) }}
|
|
<div class="mt-1">
|
|
{{ form_widget(form.firstname, {'attr': {'class': 'w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm'}}) }}
|
|
</div>
|
|
{{ form_errors(form.firstname) }}
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
{{ form_label(form.lastname, 'Nom', {'label_attr': {'class': 'block text-sm font-medium text-gray-700'}}) }}
|
|
<div class="mt-1">
|
|
{{ form_widget(form.lastname, {'attr': {'class': 'w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm'}}) }}
|
|
</div>
|
|
{{ form_errors(form.lastname) }}
|
|
</div>
|
|
|
|
<div class="mt-6 text-center">
|
|
{{ form_widget(form.submit, {
|
|
'attr': {'class': 'w-full px-4 py-2 bg-indigo-600 text-white font-semibold rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500'}
|
|
}) }}
|
|
</div>
|
|
{% for type, messages in app.flashes %}
|
|
<div class="mb-4">
|
|
{% for message in messages %}
|
|
<div class="text-sm {% if type == 'success' %}text-green-600{% else %}text-red-600{% endif %}">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{{ form_end(form) }}
|
|
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|