From 2bf414fcf331f5b889dcf36f6dcdbf4234dc0073 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Thu, 7 Dec 2023 20:36:53 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20bug=20si=20aucune=20cat=C3=A9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mouvements/entrees/non_repertorie.html | 48 ++++++++++++++------------ 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/mouvements/entrees/non_repertorie.html b/mouvements/entrees/non_repertorie.html index 531c725..6457329 100644 --- a/mouvements/entrees/non_repertorie.html +++ b/mouvements/entrees/non_repertorie.html @@ -67,30 +67,34 @@ {{:assign var="categories.%s"|args:$category.key value=$category.name}} {{/load}} -{{* formulaire d'ajout de matériel *}} -
+{{if $categories != null}} + {{* formulaire d'ajout de matériel *}} + -
- Ajouter une entrée d'un matériel non répertorié -
- {{:input type="select" name="type_operation" label="Type" required=true options=$input_labels}} - {{:input type="date" name="date" label="Date" required=true default=$now|date_short}} - {{:input type="number" name="quantite" label="Quantité" required=true default=1}} -
-
+
+ Ajouter une entrée d'un matériel non répertorié +
+ {{:input type="select" name="type_operation" label="Type" required=true options=$input_labels}} + {{:input type="date" name="date" label="Date" required=true default=$now|date_short}} + {{:input type="number" name="quantite" label="Quantité" required=true default=1}} +
+
-
- Matériel -
- {{:input type="select" name="category" label="Catégorie" required=true options=$categories}} - {{:input type="text" name="designation" label="Désignation" required=true}} - {{:input type="textarea" name="remarques" label="Remarques" cols="40", rows="3" required=false}} -
-
+
+ Matériel +
+ {{:input type="select" name="category" label="Catégorie" required=true options=$categories}} + {{:input type="text" name="designation" label="Désignation" required=true}} + {{:input type="textarea" name="remarques" label="Remarques" cols="40", rows="3" required=false}} +
+
-

- {{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}} -

+

+ {{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}} +

-
+ +{{else}} +

Il n'y a aucune catégorie

+{{/if}} {{:admin_footer}}