{% extends 'school/base.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">ANNÉE SCOLAIRE</p>
                <h1 class="admin-page-title">{{ title }}</h1>
                <p>Préparez les périodes de gestion des classes, inscriptions et réinscriptions.</p>
            </div>
            <a class="admin-btn admin-btn-light" href="{{ path('school_annee_index') }}">Retour aux années</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>Informations principales</h2>
                            <p>Libellé, rattachement éventuel et période d’activité.</p>
                        </div>
                    </div>
                    <div class="admin-form-two-cols">
                        {{ form_row(form.libelle) }}
                        {{ form_row(form.section) }}
                    </div>
                    <div class="admin-form-two-cols">
                        {{ form_row(form.dateDebut) }}
                        {{ form_row(form.dateFin) }}
                    </div>
                </section>

                <section class="admin-card admin-form-section">
                    <div class="admin-card-head">
                        <div>
                            <h2>Statut</h2>
                            <p>Le statut facilite le suivi administratif des sessions.</p>
                        </div>
                    </div>
                    <div class="admin-form-two-cols">
                        {{ form_row(form.statut) }}
                        <div class="admin-form-check admin-form-check-card">
                            {{ form_row(form.active) }}
                        </div>
                    </div>
                </section>
            </div>

            <div class="admin-form-actions admin-form-actions-sticky">
                <a class="btn admin-btn admin-btn-secondary" href="{{ path('school_annee_index') }}">Annuler</a>
                <button class="btn admin-btn admin-btn-primary" type="submit">Enregistrer</button>
            </div>
        {{ form_end(form) }}
    </div>
{% endblock %}
