{{#restrict section="config" level="admin" block=true}}{{/restrict}} {{:admin_header title="Configuration" current="module_equipment"}} {{* barre de navigation *}} {{:include file="/%s/_nav.html"|args:$module.name current="config"}} {{if $_GET.ok}}
Configuration enregistrée.
{{/if}} {{* Traiter l'envoi du formulaire *}} {{#form on="save"}} {{:assign var="labels" value=$_POST.input_fields.label}} {{:assign var="owner_keys" value=$_POST.input_fields.owner|keys}} {{#foreach from=$labels item="label"}} {{if $label|in:$owner_keys}} {{* label présent *}} {{:assign var="input_fields." label=$label|trim owner=1|boolval}} {{else}} {{* label absent *}} {{:assign var="input_fields." label=$label|trim owner=0|boolval}} {{/if}} {{/foreach}} {{:save key="config" validate_schema="./config.schema.json" inputNature=$input_fields outputNature=$_POST.output_fields }} {{:redirect to="./config.html?ok=1"}} {{/form}} {{* types d'entrées *}} {{:assign var='types_entrees.Achat' value=1}} {{:assign var='types_entrees.Don' value=1}} {{:assign var='types_entrees.Récupération' value=1}} {{:assign var='types_entrees.Location' value=0}} {{:assign var='types_entrees.Emprunt' value=0}} {{* types de sorties *}} {{:assign var='types_sorties.' value='Vente'}} {{:assign var='types_sorties.' value='Don'}} {{:assign var='types_sorties.' value='Location'}} {{:assign var='types_sorties.' value='Prêt'}} {{:admin_footer}}