Début gestion catégories : ajout, suppression

This commit is contained in:
Jean-Christophe Engel 2023-10-12 14:55:05 +02:00
parent e0400616a4
commit f211ce0450
2 changed files with 67 additions and 1 deletions

16
categories/delete.html Normal file
View file

@ -0,0 +1,16 @@
{{#restrict section="config" level="admin" block=true}}{{/restrict}}
{{:admin_header title="Supprimer une catégorie" current="module_equipment"}}
{{#load key=$_GET.id assign="category"}}
{{else}}
{{:error message="Catégorie introuvable"}}
{{/load}}
{{#form on="delete"}}
{{:delete where="key = :key OR $$.category = :key" :key=$category.key}}
{{:redirect to="./index.html"}}
{{/form}}
{{:delete_form legend="Supprimer cette catégorie ?" warning="Supprimer la catégorie \"%s\" ?"|args:$category.name info="Les matériels associés seront perdus."}}
{{:admin_footer}}