Simplification messages

This commit is contained in:
Jean-Christophe Engel 2025-02-25 15:31:53 +01:00
parent 5757c4161d
commit e856347d40
8 changed files with 16 additions and 30 deletions

View file

@ -21,8 +21,7 @@
type="category"
name=$cat_name
}}
{{:assign msg="Catégorie « %s » enregistrée"|args:$cat_name}}
{{:redirect force="./index.html?ok=1&msg=%s"|args:$msg}}
{{:redirect force="./index.html?ok=1&msg=ajout"}}
{{/form}}
{{:admin_header title="Gestion des matériels" current="module_equipment"}}

View file

@ -12,8 +12,7 @@
{{else}}
{{* supprimer la catégorie sélectionnée*}}
{{:delete where="key = :key" :key=$category.key}}
{{:assign msg="Catégorie « %s » supprimée"|args:$category.name}}
{{:redirect force="./index.html?ok=1&msg=%s"|args:$msg}}
{{:redirect force="./index.html?ok=1&msg=suppression"|args:$msg}}
{{/load}}
{{/form}}

View file

@ -10,13 +10,11 @@
<p class="block confirm">Modification enregistrée</p>
{{elseif $_GET.msg == "suppression"}}
<p class="block confirm">Catégorie supprimée</p>
{{else}}
<p class="block confirm">{{$_GET.msg}}</p>
{{elseif $_GET.msg == "ajout"}}
<p class="block confirm">Catégorie ajoutée</p>
{{/if}}
{{elseif $_GET.err}}
{{if $_GET.msg == "modification"}}
<p class="block error">{{$_GET.msg}}</p>
{{elseif $_GET.msg == "suppression"}}
{{if $_GET.msg == "suppression"}}
<p class="block error">
Cette catégorie ne peut être supprimée car elle contient encore des matériels
</p>