
{% extends '@ajax-layout/layout.twig' %}

{% block body %}

<script type="text/javascript">

$("#send").click(function(e) {

    var ACD_COMMENT = $('#ACD_COMMENT').val();
    
    $.ajax({
    	url : '{{ path('Contrat.accord-cadre.popupCommentaire', {'type' : 'accordCadre', 'idacc' : idacc } ) }}',
        type: 'POST',
	  	dataType : 'HTML',
        data: {'ACD_COMMENT' : ACD_COMMENT},
        success: function (data) { 
        	refrechDiv('{{ path('Contrat.accord-cadre.index', {type:'ALL', idacc:'ALL'}) }}', 'refreshAjaxAcc', 'form_filtre_acc');
        	desactivePopup();
			$('#comment_{{ idacc }}').html(ACD_COMMENT);
        }
    });

});
</script>


<div class="modal-body clearfix">
    <form class="form clearfix">
    	<div class="row">
        	<label>{{'Commentaire' | trad}} :</label>
        	<textarea class="form-control" id="ACD_COMMENT" name="ACD_COMMENT" >{{ commentaire.ACD_COMMENT }}</textarea>
        </div>
    </form>
    <div class="modal-footer">
				
	
         <button type ="button" id="send" class="button principal button_right" >{{'Enregistrer' | trad}}</button>
         <button onclick ="desactivePopup()" class="button secondaire button_right" data-dismiss="modal">{{'Annuler' | trad }}</button>
         
    </div>
</div

{% endblock %}