refonte config types ES
This commit is contained in:
parent
b19904b05b
commit
08ff1f82fd
16 changed files with 133 additions and 208 deletions
|
|
@ -12,14 +12,14 @@
|
|||
|
||||
{{#form on="save"}}
|
||||
{{* vérifier l'existence d'une entrée de même nom et générer le résultat *}}
|
||||
{{#foreach from=$config.input_nature item=elem}}
|
||||
{{#foreach from=$config.input_nature key=key}}
|
||||
{{if $label|trim|tolower == $_POST.input_fields.label|trim|tolower}}
|
||||
{{:error message="Ce libellé d'entrée est déjà présent"}}
|
||||
{{/if}}
|
||||
{{#foreach from=$elem key=label item=value}}
|
||||
{{:assign var="in.%s"|args:$label value=$value}}
|
||||
{{/foreach}}
|
||||
{{:assign var="input_natures." from="in"}}
|
||||
{{:assign var="input_nature.key" value=$key}}
|
||||
{{:assign var="input_nature.label" value=$label}}
|
||||
{{:assign var="input_nature.type" value=$type}}
|
||||
{{:assign var="input_natures." from=input_nature}}
|
||||
{{/foreach}}
|
||||
|
||||
{{* ajouter la nouvelle entrée *}}
|
||||
|
|
@ -32,14 +32,14 @@
|
|||
{{/if}}
|
||||
|
||||
{{* vérifier l'existence d'une sortie de même nom et générer le résultat *}}
|
||||
{{#foreach from=$config.output_nature item=elem}}
|
||||
{{#foreach from=$config.output_nature key=key}}
|
||||
{{if $label|trim|tolower == $_POST.output_fields.label|trim|tolower}}
|
||||
{{:error message="Ce libellé de sortie est déjà présent"}}
|
||||
{{/if}}
|
||||
{{#foreach from=$elem key=label item=value}}
|
||||
{{:assign var="out.%s"|args:$label value=$value}}
|
||||
{{/foreach}}
|
||||
{{:assign var="output_natures." from="out"}}
|
||||
{{:assign var="output_nature.key" value=$key}}
|
||||
{{:assign var="output_nature.label" value=$label}}
|
||||
{{:assign var="output_nature.type" value=$type}}
|
||||
{{:assign var="output_natures." from=output_nature}}
|
||||
{{/foreach}}
|
||||
|
||||
{{* ajouter la nouvelle sortie *}}
|
||||
|
|
|
|||
|
|
@ -15,25 +15,25 @@
|
|||
{{:include file="../_get_config.html" keep="config"}}
|
||||
|
||||
{{#form on="delete"}}
|
||||
{{#foreach from=$config.input_nature item=elem}}
|
||||
{{#foreach from=$config.input_nature key=key}}
|
||||
{{if $_GET.dir == 'input' && $label|trim|tolower != $_GET.mvt|trim|tolower ||
|
||||
$_GET.dir == 'output'
|
||||
}}
|
||||
{{#foreach from=$elem key=label item=value}}
|
||||
{{:assign var="in.%s"|args:$label value=$value}}
|
||||
{{/foreach}}
|
||||
{{:assign var="input_natures." from="in"}}
|
||||
{{:assign var="input_nature.key" value=$key}}
|
||||
{{:assign var="input_nature.label" value=$label}}
|
||||
{{:assign var="input_nature.type" value=$type}}
|
||||
{{:assign var="input_natures." from=input_nature}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
||||
{{#foreach from=$config.output_nature item=elem}}
|
||||
{{#foreach from=$config.output_nature key=key}}
|
||||
{{if $_GET.dir == 'output' && $label|trim|tolower != $_GET.mvt|trim|tolower ||
|
||||
$_GET.dir == 'input'
|
||||
}}
|
||||
{{#foreach from=$elem key=label item=value}}
|
||||
{{:assign var="out.%s"|args:$label value=$value}}
|
||||
{{/foreach}}
|
||||
{{:assign var="output_natures." from="out"}}
|
||||
{{:assign var="output_nature.key" value=$key}}
|
||||
{{:assign var="output_nature.label" value=$label}}
|
||||
{{:assign var="output_nature.type" value=$type}}
|
||||
{{:assign var="output_natures." from=output_nature}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
||||
|
|
@ -44,7 +44,6 @@
|
|||
output_nature=$output_natures
|
||||
}}
|
||||
{{:redirect to="./config.html?ok=1"}}
|
||||
|
||||
{{/form}}
|
||||
|
||||
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue