{% extends 'layout.twig' %}

{% block body %}
	<div class="contenu clearfix"  id="fournisseurs">
	<h1>
    	{{ 'Commande' | trad}}
    </h1>
    {{ ariane() }}
    
    <div id="detail_fournisseur" class="clearfix titre_div">
            <h2>{{ 'Commande' | trad ~ commandeId }}</h2>
			<div id="clotureLitige" class="tab-pane fade in active clearfix padding15">
				<form method="post" name="form_clotureLitige" id="form_clotureLitige" class="box-form clearfix">
				
					<div class="colonne2">
						<div class="row">
							{{ inputAdvance('TEXTAREA', {
								'titre' : 'Commentaire' | trad,
								'name'  : 'CONTMEMO',
								'value'  : post.CONTMEMO,
								'pathValidator' : path('Ajax.validator.isStringAvecEspace'),
								'paramsValidator' : "{'sizeMin' : '1', 'sizeMax' : '3000'}",
								'obligatoire' : true,
							}) }}
						</div>
					</div>				
					
					
					<div class="button_right full validation_modal">
						<a type="button" class="button principal button_right" onclick="SendEvenement('{{ pathEvent }}');">{{ 'Enregistrer' | trad }}</a>
						{% if lienAnnulation %}
							<a type="button" class="button secondaire button_right" onclick="{{ lienAnnulation }}">{{ 'Annuler' | trad }}</a>
						{% else %}
							<a type="button" class="button secondaire button_right" href="{{ pathAnnulation }}">{{ 'Annuler' | trad }}</a>
						{% endif %}
					</div>
						
						
				</form>
			</div>
		</div>
	</div>   			

<script>
function SendEvenement(path)
{
	activeLoader();
	$.ajax({
    	url: path,
    	data: $('#form_clotureLitige').serialize(),
    	type: "POST",
		success: function (data) {            
				desactiveLoader();
				$("#modal-content").addClass("modal_small");
				$("#modal-body").html(data);
				activePopup();
		},
    });
	desactiveLoader();
}
</script>
{% endblock %}