Mutualisation E/S et petites simplifications
This commit is contained in:
parent
55e649ce0d
commit
262d1935ca
10 changed files with 126 additions and 193 deletions
|
|
@ -13,7 +13,7 @@
|
|||
{{/load}}
|
||||
|
||||
{{* récupérer la config des entrées/sorties *}}
|
||||
{{:include file="../_get_config.html" keep="config"}}
|
||||
{{:include file="../_get_config.html" keep="config, directions"}}
|
||||
|
||||
{{* infos pour affichage *}}
|
||||
{{:assign var="op_label" from="config.%s_nature.%s.label"|args:$mvt_new.direction:$mvt_new.operation}}
|
||||
|
|
@ -27,17 +27,12 @@
|
|||
{{:error message="Aucun matériel avec la clé « %s »"|args:$eqpmt_key}}
|
||||
{{/load}}
|
||||
|
||||
{{if $mvt_new.direction == "input"}}
|
||||
{{* types d'entrées *}}
|
||||
{{#foreach from=$config.input_nature key=key}}
|
||||
{{:assign var="input_labels.%s"|args:$key value=$label}}
|
||||
{{#foreach from=$directions key="direction"}}
|
||||
{{:assign var="nature" from="config.%s_nature"|args:$direction}}
|
||||
{{#foreach from=$nature key="key"}}
|
||||
{{:assign var="%s_labels.%s"|args:$direction:$key value=$label}}
|
||||
{{/foreach}}
|
||||
{{else}}
|
||||
{{* types de sorties *}}
|
||||
{{#foreach from=$config.output_nature key=key}}
|
||||
{{:assign var="output_labels.%s"|args:$key value=$label}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
||||
{{*
|
||||
-------------------- Traiter la saisie --------------------
|
||||
|
|
@ -53,17 +48,16 @@
|
|||
{{/if}}
|
||||
|
||||
{{* préparer le mouvement modifié *}}
|
||||
{{:assign var="mvt_new.operation" value=$_POST.operation}}
|
||||
{{:assign var="type_mvt" from="config.%s_nature.%s.type"|args:$mvt_new.direction:$mvt_new.operation}}
|
||||
|
||||
{{if $mvt_new.direction == "input"}}
|
||||
{{:assign var="mvt_new.operation" value=$_POST.operation}}
|
||||
{{:assign var="type_mvt" from="config.input_nature.%s.type"|args:$mvt_new.operation}}
|
||||
{{if $type_mvt == "temporaire"}}
|
||||
{{:assign prop=0}}
|
||||
{{else}}
|
||||
{{:assign prop=1}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{:assign var="mvt_new.operation" value=$_POST.operation}}
|
||||
{{:assign var="type_mvt" from="config.output_nature.%s.type"|args:$mvt_new.operation}}
|
||||
{{if $type_mvt == "retour"}}
|
||||
{{:assign prop=0}}
|
||||
{{else}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue