first commit

This commit is contained in:
julien
2026-03-20 22:16:20 +01:00
commit 42a4ba3e9a
136 changed files with 10141 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
{#
Boîte d'ajout réutilisable dans l'admin.
Usage type :
{% embed '@Kernel/partials/_admin_create_box.twig' with {
title: 'Ajouter un élément',
hint: 'Le contenu de la boîte est piloté par le module consommateur.',
form: { action: '/admin/items/create' }
} %}
{% block fields %}...{% endblock %}
{% block actions %}...{% endblock %}
{% endembed %}
#}
{% set form = form|default({}) %}
{% set extra = form.extra|default({}) %}
<div class="admin-create">
<h3 class="admin-create__title">{{ title }}</h3>
<form
{% if form.id is defined %}id="{{ form.id }}"{% endif %}
method="{{ form.method|default('post') }}"
{% if form.action is defined %}action="{{ form.action }}"{% endif %}
{% if form.enctype is defined %}enctype="{{ form.enctype }}"{% endif %}
class="admin-create__form{% if form.class is defined %} {{ form.class }}{% endif %}"
{% for name, value in extra %} {{ name }}="{{ value }}"{% endfor %}
>
{% include '@Kernel/partials/_csrf_fields.twig' %}
{% block fields %}{% endblock %}
<div class="admin-create__actions">
{% block actions %}{% endblock %}
</div>
</form>
{% if hint is defined and hint %}
<p class="admin-create__hint">{{ hint }}</p>
{% endif %}
</div>