Correction bug si aucune catégorie

This commit is contained in:
Jean-Christophe Engel 2023-12-07 20:36:53 +01:00
parent 57724591c3
commit 2bf414fcf3
1 changed files with 26 additions and 22 deletions

View File

@ -67,30 +67,34 @@
{{:assign var="categories.%s"|args:$category.key value=$category.name}}
{{/load}}
{{* formulaire d'ajout de matériel *}}
<form method="post" action="">
{{if $categories != null}}
{{* formulaire d'ajout de matériel *}}
<form method="post" action="">
<fieldset class="entree">
<legend>Ajouter une entrée d'un matériel non répertorié</legend>
<dl>
{{: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}}
</dl>
</fieldset>
<fieldset class="entree">
<legend>Ajouter une entrée d'un matériel non répertorié</legend>
<dl>
{{: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}}
</dl>
</fieldset>
<fieldset>
<legend>Matériel</legend>
<dl>
{{: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}}
</dl>
</fieldset>
<fieldset>
<legend>Matériel</legend>
<dl>
{{: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}}
</dl>
</fieldset>
<p class="submit">
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
</p>
<p class="submit">
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
</p>
</form>
</form>
{{else}}
<p class="block error">Il n'y a aucune catégorie</p>
{{/if}}
{{:admin_footer}}