{% if isEditMode %} {{ form_start(form, { 'attr': { 'class': 'w-full flex flex-row gap-3 items-top' } }) }}
{{ form_widget(form.icon) }} {{ form_label(form.icon) }}

Noter le nom de l'icône choisie sur ux.symfony

{{ form_widget(form.name) }} {{ form_label(form.name) }}
{{ form_widget(form.family) }}
{% include "partials/elements/_button.html.twig" with { type: 'brand', icon: 'codicon:save', pins: true, action: 'save', text: 'Enregistrer' } %} {% include "partials/elements/_button.html.twig" with { type: 'danger', icon: 'codicon:close', pins: true, action: 'toggleEditMode', text: 'Annuler' } %}
{{ form_end(form) }} {% elseif isDeleteMode %}

Etes-vous sur de vouloir supprimer cette catégorie ?

{% include "partials/elements/_button.html.twig" with { type: 'brand', icon: '', pins: false, action: 'delete', text: 'Oui' } %} {% include "partials/elements/_button.html.twig" with { type: 'danger', icon: '', pins: false, action: 'toggleDeleteMode', text: 'Non' } %}
{% else %}
{{ ux_icon(category.icon ?: category.family.icon, {class: 'w-5 h-5'}) }}
{{ category.name }}
{% if not category.isSystem %}
{% include "partials/elements/_button.html.twig" with { type: 'warning', icon: 'streamline-freehand:edit-pencil', pins: true, action: 'toggleEditMode', text: 'Modifier' } %} {% include "partials/elements/_button.html.twig" with { type: 'danger', icon: 'streamline-freehand:delete-bin-2', pins: true, action: 'toggleDeleteMode', text: 'Supprimer' } %}
{% endif %}
{% endif %}