Amélioration création et modification lieu stockage

This commit is contained in:
Jean-Christophe Engel 2025-04-18 21:42:02 +02:00
parent 92ec78b6c1
commit 467a094b14
2 changed files with 28 additions and 15 deletions

View file

@ -8,7 +8,7 @@
{{if $_POST.name == null}}
{{:error message="Le nom du lieu de stockage est obligatoire"}}
{{/if}}
{{#load type="storage" where="$$.name = :name COLLATE U_NOCASE" :name=$_POST.name|trim limit=1}}
{{#load type="storage" where="$$.name = :name" :name=$_POST.name|trim limit=1}}
{{:error message="Ce nom est déjà utilisé"}}
{{/load}}
@ -16,8 +16,8 @@
key=""|uuid
validate_schema="storage.schema.json"
type="storage"
name=$_POST.name|trim|ucwords
location=$_POST.location
name=$_POST.name|trim
location=$_POST.location|trim
}}
{{:redirect force="index.html?ok=1&msg=ajout"}}
{{/form}}