

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

{% block body %}

<div class="modal-body">
    <form method="post" enctype="multipart/form-data" name="form_ajoutDocRattPJ" id="form_ajoutDocRattPJ" class="box-form">
    	<input type="hidden" name="validationForm" id="validationForm" value="1" />
    	<input type="hidden" name="NO_ORDRE" id="NO_ORDRE" value="{{ post.numIndice }}" />
    	<input type="hidden" name="typeAjout" id="typeAjout" value="{{ post.typeAjout }}" />
    	<div class="row">
			{{ inputSelect(('Type :'|trad), 'TYPE_PJ', tableau_pj, 'PJ') }}
        </div>
    	<div class="row">
    		{{ inputText(('Titre :'|trad), 'TITRE', '', '', path('Ajax.validator.isStringAvecEspace'), "{'sizeMin' : '1', 'sizeMax' : '60'}" , '', '' ) }}
    	</div>
    	{% if post.typeAjout=='PJ' %}
    	<div class="row">
    		<label>{{ 'Lecture :'|trad }}</label>
    		<label class="switch">
            	<input type="checkbox" name="LECTURE" id="LECTURE" >
                <span class="slider round"></span>
                <span class="value_switch">{{ 'Non'|trad }}</span>                                               
            </label>
		</div>
    	<div class="row">
    		<label>{{ 'Ajouté la PJ à l\'impression :'|trad }}</label>
    		<label class="switch">
            	<input type="checkbox" name="IMP_PJ" id="IMP_PJ" >
                <span class="slider round"></span>
                <span class="value_switch">{{ 'Non'|trad }}</span>                                               
            </label>
		</div>
    	<div class="row">
    		<label>{{ 'Ajouté le titre du document à l\'impression :'|trad }}</label>
    		<label class="switch">
            	<input type="checkbox" name="IMP_TITRE" id="IMP_TITRE" onChange ="disableFieldByCheckbox()"/>
                <span class="slider round"></span>
				<span class="value_switch">{{ 'Non'|trad }}</span>                                               
            </label>
		</div>
		{% endif %}
	    <div class="row">
			<label>{{ 'Fichier' | trad ~ colon() }}</label>
			<input type="file" id="file_name" name="file_name" />
		</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" id="send">{{ 'Enregistrer' | trad }}</button>
        </div>
	</form>
</div>

{% endblock %}