{% extends 'school/base.html.twig' %}
{% form_theme form 'bootstrap_5_layout.html.twig' %}

{% block title %}{{ title }} | SALSABIL Madrassas{% endblock %}

{% block content %}
    <div class="admin-page-stack">
        <section class="admin-page-header">
            <div>
                <p class="admin-eyebrow">ÉTUDIANT</p>
                <h1 class="admin-page-title">{{ title }}</h1>
                <p>Les sections, niveaux et classes proposés appartiennent à {{ ecole.nom }}.</p>
            </div>
            <a class="admin-btn admin-btn-light" href="{{ path('school_etudiant_index') }}">Retour aux étudiants</a>
        </section>

        {{ form_start(form, {attr: {class: 'admin-form'}}) }}
            <div class="admin-form-grid">
                <section class="admin-card admin-form-section">
                    <div class="admin-card-head"><div><h2>Identité</h2><p>Informations civiles et matricule.</p></div></div>
                    <div class="admin-form-three-cols">
                        {{ form_row(form.matricule) }}
                        {{ form_row(form.nom) }}
                        {{ form_row(form.sexe) }}
                    </div>
                    <div class="admin-form-three-cols">
                        {{ form_row(form.dateNaissance) }}
                        {{ form_row(form.lieuNaissance) }}
                        {{ form_row(form.situationMatrimoniale) }}
                    </div>
                    <div class="admin-form-check admin-form-check-card">{{ form_row(form.aDesEnfants) }}</div>
                </section>

                <section class="admin-card admin-form-section">
                    <div class="admin-card-head"><div><h2>Contacts</h2><p>Téléphone, WhatsApp et adresse.</p></div></div>
                    <div class="admin-form-three-cols">
                        {{ form_row(form.telephonePrincipal) }}
                        {{ form_row(form.telephoneWhatsapp) }}
                        {{ form_row(form.email) }}
                    </div>
                    {{ form_row(form.autreContact) }}
                    {{ form_row(form.adresse) }}
                    <div class="admin-form-two-cols">
                        {{ form_row(form.joursDisponibles) }}
                        {{ form_row(form.plageHoraireSouhaitee) }}
                    </div>
                </section>

                <section class="admin-card admin-form-section">
                    <div class="admin-card-head"><div><h2>Affectation</h2><p>Position pédagogique actuelle.</p></div></div>
                    <div class="admin-form-three-cols">
                        {{ form_row(form.section) }}
                        {{ form_row(form.niveau) }}
                        {{ form_row(form.classe) }}
                    </div>
                    <div class="admin-form-two-cols">
                        <div class="admin-form-check admin-form-check-card">{{ form_row(form.ancien) }}</div>
                        <div class="admin-form-check admin-form-check-card">{{ form_row(form.actif) }}</div>
                    </div>
                </section>
            </div>
            <div class="admin-form-actions admin-form-actions-sticky">
                <a class="btn admin-btn admin-btn-secondary" href="{{ path('school_etudiant_index') }}">Annuler</a>
                <button class="btn admin-btn admin-btn-primary" type="submit">Enregistrer</button>
            </div>
        {{ form_end(form) }}
    </div>
{% endblock %}
