Correction bug si aucune catégorie
This commit is contained in:
parent
57724591c3
commit
2bf414fcf3
@ -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}}
|
||||
|
Loading…
Reference in New Issue
Block a user