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

{% block body %}
<script>

function sendForm()
{
    if($('#input_typeCreation').val()=='N'){
        redirectJSWithPost('{{ path('DemandeAchat.CreationDemandeAchat.creation') }}');
    }
    
}
</script>

	<div class="modal-body">
        <form method="post" name="form_commentaire" id="form_commentaire" class="box-form">
            <div class="row">
                {{ inputAdvance('SELECT', {
                    'titre' : 'Type de demande d\'achat' | trad,
                    'name' : 'typeCreation',
                    'listeValue' : tabTypeCreation,
                }) }}
            </div>
          	<div class="modal-footer">
                <button type="button" class="button secondaire" data-dismiss="modal" onclick="desactivePopup();">{{ 'Annuler' | trad }}</button>
                <button type="button" class="button principal"  onclick="sendForm();">{{ 'Valider' | trad }}</button>
        	</div>
        </form>
	</div

{% endblock %}