diff --git a/config.html b/config.html index e3b2a36..4215003 100644 --- a/config.html +++ b/config.html @@ -15,10 +15,14 @@ {{:assign var="input_fields." label=$field.label|trim owner=$field.owner|boolval}} {{/foreach}} + {{#foreach from=$_POST.output_fields|array_transpose item="field"}} + {{:assign var="output_fields." label=$field.label|trim final=$field.final|boolval}} + {{/foreach}} + {{:save key="config" validate_schema="./config.schema.json" inputNature=$input_fields - outputNature=$_POST.output_fields + outputNature=$output_fields }} {{:redirect to="./config.html?ok=1"}} {{/form}} @@ -31,10 +35,10 @@ {{:assign var='types_entrees.Emprunt' value=0}} {{* types de sorties par défaut *}} -{{: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'}} +{{:assign var='types_sorties.Vente' value=1}} +{{:assign var='types_sorties.Don' value=1}} +{{:assign var='types_sorties.Location' value=0}} +{{:assign var='types_sorties.Prêt' value=0}}