ajout fichier mouvements/entrees/non_repertorie.html
This commit is contained in:
parent
9ab5e1eb35
commit
33f03627a4
59
mouvements/entrees/non_repertorie.html
Normal file
59
mouvements/entrees/non_repertorie.html
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{{#restrict section="config" level="admin" block=true}}{{/restrict}}
|
||||||
|
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
|
||||||
|
|
||||||
|
{{* barre de navigation *}}
|
||||||
|
{{:include file="/%s/_nav.html"|args:$module.name current="entrees"}}
|
||||||
|
|
||||||
|
{{* types d'entrées *}}
|
||||||
|
{{* TODO : stocker dans la configuration du module *}}
|
||||||
|
{{:assign var='types_entrees.' value='Achat'}}
|
||||||
|
{{:assign var='types_entrees.' value='Don'}}
|
||||||
|
{{:assign var='types_entrees.' value='Récupération'}}
|
||||||
|
{{:assign var='types_entrees.' value='Location / Prêt'}}
|
||||||
|
|
||||||
|
{{:assign maintenant=$now|date_short}}
|
||||||
|
|
||||||
|
{{* lister les catégories disponibles *}}
|
||||||
|
{{#load type="category" assign="category"}} {{* order="$$.name" debug *}}
|
||||||
|
{{:assign var="categories." value=$category.name}}
|
||||||
|
{{/load}}
|
||||||
|
|
||||||
|
{{* TODO Traiter l'envoi du formulaire *}}
|
||||||
|
{{#form on="save"}}
|
||||||
|
{{:assign key=""|uuid}}
|
||||||
|
{{:save
|
||||||
|
key=$key
|
||||||
|
validate_schema="./category.schema.json"
|
||||||
|
type="category"
|
||||||
|
name=$_POST.name|trim
|
||||||
|
}}
|
||||||
|
{{:redirect to="./index.html?ok=1"}}
|
||||||
|
{{/form}}
|
||||||
|
{{* /TODO *}}
|
||||||
|
|
||||||
|
{{:form_errors}}
|
||||||
|
|
||||||
|
{{* formulaire d'ajout de matériel *}}
|
||||||
|
<form method="post" action="{{$_GET.caller}}">
|
||||||
|
|
||||||
|
<fieldset class="entree">
|
||||||
|
<legend>Ajouter une entrée d'un matériel non répertorié</legend>
|
||||||
|
{{:input type="select" name="type_materiel" label="Type" required=true options=$types_entrees}}
|
||||||
|
{{:input type="date" name="date" label="Date" required=true default=$maintenant}}
|
||||||
|
{{:input type="number" name="quantite" label="Quantité" required=true default=1}}
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>Matériel</legend>
|
||||||
|
{{: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}}
|
||||||
|
</fieldset>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
|
||||||
|
{{:button type="submit" name="cancel" label="Annuler" shape="delete" class="main"}}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
{{:admin_footer}}
|
Loading…
Reference in New Issue
Block a user