{% 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">NIVEAU</p>
                <h1 class="admin-page-title">{{ title }}</h1>
                <p>Structurez les étapes pédagogiques proposées par votre madrassa.</p>
            </div>
            <a class="admin-btn admin-btn-light" href="{{ path('school_niveau_index') }}">Retour aux niveaux</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>Nom, slug public et section de rattachement si nécessaire.</p>
                        </div>
                    </div>
                    <div class="admin-form-two-cols">
                        {{ form_row(form.nom) }}
                        {{ form_row(form.slug) }}
                    </div>
                    <div class="admin-form-two-cols">
                        {{ form_row(form.section) }}
                        {{ form_row(form.ordre) }}
                    </div>
                    {{ form_row(form.description) }}
                </section>

                <section class="admin-card admin-form-section">
                    <div class="admin-card-head">
                        <div>
                            <h2>Statut</h2>
                            <p>Un niveau actif peut apparaître dans les pages publiques de la madrassa.</p>
                        </div>
                    </div>
                    <div class="admin-form-check admin-form-check-card">
                        {{ form_row(form.active) }}
                    </div>
                </section>
            </div>

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