From e17613e53240ed559c5045423fc863c4de5783c6 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Tue, 19 Nov 2024 15:18:51 +0100 Subject: [PATCH] =?UTF-8?q?am=C3=A9lioration=20navigation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventaire.html | 1 - modifier_materiel.html | 2 +- mouvements/entrees/repertorie.html | 13 +++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/inventaire.html b/inventaire.html index 085bcda..ab0d4e1 100644 --- a/inventaire.html +++ b/inventaire.html @@ -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}} diff --git a/modifier_materiel.html b/modifier_materiel.html index 22022b3..71101e9 100644 --- a/modifier_materiel.html +++ b/modifier_materiel.html @@ -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}} diff --git a/mouvements/entrees/repertorie.html b/mouvements/entrees/repertorie.html index 638ce34..d417d16 100644 --- a/mouvements/entrees/repertorie.html +++ b/mouvements/entrees/repertorie.html @@ -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 @@
Ajouter une entrée de matériel
- {{: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}}