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

{% block body %}
<p class="zoneError" style="text-align:center;">{{ erreur | raw }}</p>
<form method="post" name="form_Evenement" id="form_Evenement" class="form-default">
	<input type="hidden" name="NODEMEMO" value="{{ event.NODEMEMO }}" />
	{% if modification == false or liste_event[event.CODE_EVE] %}
		{{ inputSelect("Evènement" | trad,"CODE_EVE", liste_event, event.CODE_EVE, modification ? 'disabled':'') }}
	{% else %}
		{{ inputAdvance('TEXTE', {
			'titre' : 'Evènement' | trad,
			'name' : 'CODE_EVE',
			'value' : event.libEvent,
			'option' : 'readOnly',	
		}) }}
	{% endif %}
	
	<label>{{ 'Texte' | trad }} :</label>
	<textarea name="CONTMEMO" rows="10" cols="50" class="form-control form-control-sm" id="relance_msg" name="relance_msg">{{ event.CONTMEMO }}</textarea>
</form>    
<div class="modal-footer">
    <button class="secondaire" onclick="desactivePopup();">{{ 'Annuler' | trad }}</button>
    <button class="principal" onclick="SendEvenement('{{ pathEvent }}');">{{ 'Enregistrer' | trad }}</button>
</div>
<script>
function SendEvenement(path)
{
	activeLoader();
	$.ajax({
	  	dataType : 'html',
    	url: path,
    	data: $('#form_Evenement').serialize(),
    	type: "POST",
    	success: function(result){
    		desactiveLoader();
    		$("#modal-body").html(result);
    	}
    });
}
</script>
{% endblock %}

                                                