{% extends 'manager/manager_base.html.twig' %} {% block title %}Créer un nouvel utilisateur{% endblock %} {% block content %}
{# --- En-tête de la Page --- #}

Création d'un nouvel utilisateur

{# --- Affichage des messages flash (Style uniforme) --- #} {% for label, messages in app.flashes %} {% for message in messages %} {% endfor %} {% endfor %} {# --- Corps du Formulaire dans une Carte Structurée --- #}
{# Ajout de l'ID pour le ciblage JS #} {{ form_start(form, {'attr': {'id': 'user-form'}}) }}
{# COLONNE PRINCIPALE (8/12) : Informations Personnelles et de Sécurité #}

Informations Personnelles

{{ form_row(form.civilite) }}
{{ form_row(form.nom) }}
{{ form_row(form.prenoms) }}
{{ form_row(form.telephone) }}

Sécurité

{{ form_row(form.email) }}
{# Le RepeatedType a besoin d'être affiché champ par champ ou avec form_row #}
{{ form_row(form.password.first, {'label': 'Mot de passe'}) }}
{{ form_row(form.password.second, {'label': 'Confirmation du mot de passe'}) }}
{# COLONNE LATÉRALE (4/12) : Relations et Statut #}

Rôles & Structure

{# 1. Carte pour les Relations (Profil et Hiérarchie) #}
Affectation
{{ form_row(form.profil) }}
{{ form_row(form.hierarchique) }}
{# 2. Carte pour le Statut du Compte #}
Statut
{{ form_row(form.statut) }}

{# Boutons d'action centrés #}
Retour à la liste
{# Affiche le token CSRF et tout champ non rendu #} {{ form_rest(form) }} {{ form_end(form) }}
{% endblock %} {% block javascripts %} {% endblock %}