{% extends 'base.html.twig' %} {% block breadcrumb %} {% endblock %} {% block titulo_body %} list

Nuevo Desistimiento


{% endblock %} {% block javascripts %} {{parent()}} {% endblock %} {% block javascripts_base %} function initDateFormat( datePicker ) { var selectedDate = ( typeof datePicker.date === 'undefined' || datePicker.date === null ) ? datePicker.options.defaultDate : datePicker.date; var shortWeekdays = datePicker.options.i18n.weekdaysShort; var shortMonths = datePicker.options.i18n.monthsShort; var day = selectedDate.getDate(); var weekday = shortWeekdays[ selectedDate.getDay() ]; var month = shortMonths[ selectedDate.getMonth() ]; var formattedDate = weekday + ', ' + day + ' ' + month; document.querySelector(".datepicker-date-display .date-text").innerHTML = formattedDate; document.querySelector(".datepicker-date-display .year-text").innerHTML = selectedDate.getFullYear(); } var cleave = new Cleave('#desistimientos_new_control_filtro_fechaExamen', { date: true, delimiter: '/', datePattern: ['d', 'm', 'Y'] }); {% endblock %} {% block js_document_ready %} $('#datatable').dataTable({ createdRow: function(row, data, dataIndex) { $(row).css({"background-color":"transparent"}); }, filter : false, language: { "url": "//cdn.datatables.net/plug-ins/1.10.16/i18n/Spanish.json" }, initComplete: function() { $('.tooltipped').tooltip(); }, aLengthMenu: "", bAutoWidth: false, "columns": [ {"data" : "apellidos_nombres"}, {"data" : "DNI"}, {"data" : "FechaExamen"}, {"data" : "cargos"}, {"data" : "acciones", render: function(data, type, row, meta) { if (type === 'display') { $botones = [ "", ].join(''); return $botones; } return data; }, }, ], order: [[ 0, 'desc' ]], columnDefs: [ // These are the column name variables that will be sent to the server { "name": "apellidos_nombres", "searchable": true, "orderable": true, "targets": 0, }, { "name": "dni", "searchable": true, "orderable": true, "targets": 1 }, { "name": "FechaExamen", "searchable": true, "orderable": false, "targets": 2, }, { "name": "cargos", "searchable": true, "orderable": true, "targets": 3, }, { "searchable": false, "orderable": false, "targets": 4 }, ], serverSide: true, processing: true, ajax: { url: '{{ path('desistimiento_new_datos') }}', type: 'POST' }, fnDrawCallback: function( oSettings ) { $(".modalAgregarTerritorialidad").on("click", function (event) { event.stopPropagation(); event.preventDefault(); botonClick = event.currentTarget; //Hago una solicitud AJAX al controller $.ajax({ url: event.currentTarget.dataset.url , method: 'GET', success: function (data) { if (data.includes('form')) { // Insertor el contenido en el div del modal var modal = $("#modalAgregarTerritorialidad"); modal.find(".modal-content").html(data); modal.modal('open'); } else { location.href=data; } }, error: function (error) { swal({ title: "Error", text: error.responseText, icon: "warning", //buttons: true, }) //console.log(error); } }); }); } }); // the "href" attribute of the modal trigger must specify the modal ID that wants to be triggered $('select').formSelect(); $('.limpiar2').click(function(){ window.location.href="{{ path('new_desistimientos_limpiar') }}" }); {% endblock %} {% block body %}
{{ form_start(form) }}
{{ form_label(form.fechaExamen) }} {{ form_widget(form.fechaExamen) }}
{{ form_widget(form.dni) }} {{ form_label(form.dni) }}
{{ form_widget(form.cargo) }} {{ form_label(form.cargo) }}
{% if form.children | filter(v => (v.vars.name != "_token" and not (v.vars.value == "" or v.vars.value == []))) | length > 0 %}
{% endif %}
{{ form_end(form) }}
{% if form.children | filter(v => (v.vars.name != "_token" and not (v.vars.value == "" or v.vars.value == []))) | length > 0 %}
Nombre y Apellido DNI Fecha de Examen Cargo Acciones
{% else %}
Por favor, busque una persona y/o exámen para comenzar con el Desistimiento.
{% endif %}
Volver. undo {% endblock %} {% block dialogos_modales %} {% endblock %}