

{% block body %}

 <div class=" clearfix"  style ="margin-bottom: 10px;" id="accueil">
	<form method="POST" id='formulaireListeMultiSelectPopup'>
			 <input type="hidden" id="divCode" name="divCode" value="{{ post.divCode }}"/>

        {{ multiSelect(post.CODFILTRE, post.titre, post.listeValue??[], array_val, tabObli, 'contentCentre', post.entity, post.typeListe??[], post.arrayPost??[] )  }}
        <div style="text-align:right; margin-top : 11px">
    		<a id="send" style ="float:right;" class="button principal" >{{'Afficher' | trad}}</a>
        </div>

    </form>
</div>

<script>
$("#send").click(function(e) 
{
	{% if pathRefresh %}
    	refrechDiv('{{ pathRefresh }}', '{{post.CODFILTRE}}', 'formulaireListeMultiSelectPopup');
        desactivePopup();
	{% else %}
    	var listeValue = '';
    	var i = 0;
    	$('#{{post.CODFILTRE}}_listePost_SyncLists input').each(function() {
    		if(i==0)
    		{
    			listeValue += $(this).val();
    		}
    		else
    		{
        		listeValue += '{{ separateur }}'+$(this).val();
    		}
    		i++;
    	});
    	{# $('#'+$('#divCode').val()).val(listeValue).trigger('change'); #}

		setInputValue(document.getElementById(CSS.escape($('#divCode').val())), listeValue);

    	desactivePopup();
	{% endif %}
});
</script>

{% endblock %}