renommage champ designation => name
This commit is contained in:
parent
9ac71344fb
commit
dbbff606f6
16 changed files with 35 additions and 35 deletions
|
|
@ -26,9 +26,9 @@
|
|||
|
||||
{{* catégorie change : vérifier le nom *}}
|
||||
{{#load key=$equipment_key}}
|
||||
{{if $designation|trim|tolower != $_POST.designation|trim|tolower}}
|
||||
{{if $name|trim|tolower != $_POST.name|trim|tolower}}
|
||||
{{* le nom change => vérifier l'existence d'un matériel du même nom *}}
|
||||
{{#load type="equipment" where="$$.designation = :name" :name=$_POST.designation|trim|tolower|ucfirst limit=1}}
|
||||
{{#load type="equipment" where="$$.name = :name" :name=$_POST.name|trim|tolower|ucfirst limit=1}}
|
||||
{{:assign chgt_ok=false}}
|
||||
{{/load}}
|
||||
{{else}}
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
{{else}}
|
||||
{{* catégorie ne change pas => vérifier le nom *}}
|
||||
{{#load type="equipment" where="$$.designation = :name" :name=$_POST.designation|trim|tolower|ucfirst limit=1}}
|
||||
{{#load type="equipment" where="$$.name = :name" :name=$_POST.name|trim|tolower|ucfirst limit=1}}
|
||||
{{:assign chgt_ok=false}}
|
||||
{{/load}}
|
||||
{{/if}}
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
{{:save
|
||||
key=$equipment_key
|
||||
category=$category.key
|
||||
designation=$_POST.designation|trim|tolower|ucfirst
|
||||
name=$_POST.name|trim|tolower|ucfirst
|
||||
}}
|
||||
{{:redirect force="index.html?ok=1&msg=modification&prop=%s"|args:$_GET.prop}}
|
||||
{{/form}}
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
<legend>Modifier un matériel</legend>
|
||||
<dl>
|
||||
{{:input type="select" name="category" label="Catégorie" default=$default_category required=true options=$categories}}
|
||||
{{:input type="text" name="designation" label="Désignation" default=$equipment.designation required=true}}
|
||||
{{:input type="text" name="name" label="Désignation" default=$equipment.name required=true}}
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue