{% extends 'layout.twig' %}

{% block body %}

	<div class="contenu clearfix"  id="fournisseurs">
    	<h1>
        	{{ 'Fournisseurs' | trad }}
        </h1>	
        {{ ariane() }}
        
    	{{ navBar_creationFourniss(modeFournisseur, code_fournisseur??id, ficheFourniss) }}

        <div class="tab-content">
			<div id="ajout-zone-geographique" class="tab-pane fade in active clearfix padding15">
				<div class="colonne2">
					<table class="table table-hover sans_actions" id="tableau_zone">
                    	<thead class="thead-dark">
                        	<tr>
                            	<th scope="col" width="80px">{{ 'Code' | trad }}</th>
                                <th scope="col" >{{ 'Libellé' | trad }}</th>
                            </tr>
                        </thead>
                        <tbody>
                        	{% for zoneGeo in listeZoneGeo %}
                                <tr onclick="listeZoneGeo('{{ path('Fournisseur.ZoneGeo.ajaxTableau', {regroup : zoneGeo.CODEDCP | trim}) }}')">
                                	<td>{{ zoneGeo.CODEDCP }}</td>
                                	<td >{{ zoneGeo.LIBDECOUP }}</td>
                                </tr>                                    
                        	{% endfor %}
                          </tbody>
                      </table>
                 </div>
                 <div class="colonne2 last" id='ColonneZoneGeo'>
                      {# tableau-zoneGeo.twig #}
                 </div>
			</div>	
        </div>
	</div>
	<script type="text/javascript">
		function listeZoneGeo(path)
		{
			$.ajax({
			  	dataType : 'html',
				url: path,
				type: "POST",
				success: function(result){
					$("#ColonneZoneGeo").html(result);
				}
			});						
		}					
	</script>						
				
{% endblock %}