amélioration navigation

This commit is contained in:
Jean-Christophe Engel 2024-11-19 15:18:51 +01:00
parent 09e4ce2a42
commit e17613e532
3 changed files with 10 additions and 6 deletions

View File

@ -66,7 +66,6 @@
{{:assign var=stock from="equipments.%s.stock"|args:$equipment}}
{{:assign var=exterieur from="equipments.%s.exterieur"|args:$equipment}}
{{:assign dispo="%d-%d"|math:$stock:$exterieur}}
{{*:debug stock=$stock exterieur=$exterieur dispo=$dispo*}}
{{if $stock == null}}
{{:continue}}

View File

@ -54,7 +54,7 @@
category=$category.key
designation=$_POST.designation|trim
}}
{{:redirect force="index.html?ok=1&msg=modification"}}
{{:redirect force="index.html?ok=1&msg=modification&prop=%s"|args:$_GET.prop}}
{{else}}
{{:form_errors}}

View File

@ -29,13 +29,12 @@
{{/load}}
{{#load where="key = :key" :key=$equipment.category assign="category"}}
{{/load}}
{{*:debug equipment=$equipment category=$category*}}
{{* Traiter l'envoi du formulaire *}}
{{#form on="save"}}
{{* Enregistrer le mouvement *}}
{{:assign mvt_key=""|uuid}}
{{:assign var="operation" from="input_labels.%d|args:$_POST.type_operation}}
{{:assign var="operation" from="input_labels.%d|args:$_POST.nature_operation}}
{{:save
key=$mvt_key
@ -48,7 +47,13 @@
date=$_POST.date|parse_date
comment=$_POST.remarques|trim
}}
{{:redirect force="%sindex.html?ok=1&msg=entrée"|args:$module.url}}
{{:assign var=type_entree from="config.input_nature.%s"|args:$operation}}
{{if $type_entree == "temporaire"}}
{{:assign prop=0}}
{{else}}
{{:assign prop=1}}
{{/if}}
{{:redirect force="%sindex.html?ok=1&msg=entrée&prop=%s"|args:$module.url:$prop}}
{{else}}
{{:form_errors}}
{{/form}}
@ -59,7 +64,7 @@
<fieldset class="entree">
<legend>Ajouter une entrée de matériel</legend>
<dl>
{{:input type="select" name="type_operation" label="Type" required=true options=$input_labels}}
{{:input type="select" name="nature_operation" label="Type" required=true options=$input_labels}}
{{:input type="date" name="date" label="Date" required=true default=$now|date_short}}
{{:input type="text" name="equipment" label="Matériel" required=true disabled=true default=$equipment.designation}}
{{:input type="text" name="category" label="Catégorie" required=true disabled=true default=$category.name}}