{{* -*- brindille -*- *}} {{* paramètres : - dir : input ou output - op_key : clé du type de mouvement dont on veut modifier le libellé *}} {{* barre de navigation *}} {{if ! $dialog}} {{:include file="../_nav.html" current="config" subcurrent="typesES"}} {{/if}} {{* lecture config (défaut ou enregistrée) *}} {{:include file="../_get_config.html" keep="config"}} {{#form on="save"}} {{:assign input_nature=null}} {{#foreach from=$config.input_nature key=key}} {{:assign var="input_nature.key" value=$key}} {{if $_GET.dir == 'input'}} {{if $key == $_GET.op_key}} {{:assign var="input_nature.label" value=$_POST.name|trim|tolower|ucfirst}} {{else}} {{:assign var="input_nature.label" value=$label}} {{/if}} {{else}} {{:assign var="input_nature.label" value=$label}} {{/if}} {{:assign var="input_nature.type" value=$type}} {{:assign var="input_natures." from=input_nature}} {{/foreach}} {{#foreach from=$config.output_nature key=key}} {{:assign var="output_nature.key" value=$key}} {{if $_GET.dir == 'output'}} {{if $key == $_GET.op_key}} {{:assign var="output_nature.label" value=$_POST.name|trim|tolower|ucfirst}} {{else}} {{:assign var="output_nature.label" value=$label}} {{/if}} {{else}} {{:assign var="output_nature.label" value=$label}} {{/if}} {{:assign var="output_nature.type" value=$type}} {{:assign var="output_natures." from=output_nature}} {{/foreach}} {{:save key="config" validate_schema="../config.schema.json" input_nature=$input_natures output_nature=$output_natures }} {{:redirect to="./config.html?ok=1"}} {{/form}} {{:admin_header title="Gestion des matériels" current="module_equipment"}} {{:form_errors}} {{:assign var="default_label" from="config.%s_nature.%s.label"|args:$_GET.dir:$_GET.op_key}}