{% extends 'base.html.twig' %} {% block javascripts_base %} {{ parent() }} {% endblock %} {% block js_document_ready %} {{ parent() }} $('.ria-eliminar-archivo').click(function(e) { var urlRequest = $(this).data('ria-url'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $('.ria-eliminar-archivo').parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-dni-copia-delPoda').click(function(e) { var urlRequest = $(this).data('ria-url'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $('.ria-eliminar-dni-copia-delPoda').parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-registro-antecedentes').click(function(e) { var urlRequest = $(this).data('ria-url'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $('.ria-eliminar-registro-antecedentes').parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-constancia-domicilio').click(function(e) { var urlRequest = $(this).data('ria-url'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $('.ria-eliminar-constancia-domicilio').parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-EjercicioProfesional').click(function(e) { var urlRequest = $(this).data('ria-url'); var idEjercicioProfesional = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idEjercicioProfesional).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-FuncionPublica').click(function(e) { var urlRequest = $(this).data('ria-url'); var idFuncionPublica = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idFuncionPublica).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-EjercicioLibre').click(function(e) { var urlRequest = $(this).data('ria-url'); var idEjercicioLibre = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idEjercicioLibre).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-InscripcionMatricula').click(function(e) { var urlRequest = $(this).data('ria-url'); var idInscripcionMatricula = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idInscripcionMatricula).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-PatrocinioGratuito').click(function(e) { var urlRequest = $(this).data('ria-url'); var idPatrocinioGratuito = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idPatrocinioGratuito).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-ProyectoExtension').click(function(e) { var urlRequest = $(this).data('ria-url'); var idProyectoExtension = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idProyectoExtension).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-Expositor').click(function(e) { var urlRequest = $(this).data('ria-url'); var idExpositor = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idExpositor).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-TrabajoLegislativo').click(function(e) { var urlRequest = $(this).data('ria-url'); var idTrabajoLegislativo = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idTrabajoLegislativo).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-CargoEjecutivo').click(function(e) { var urlRequest = $(this).data('ria-url'); var idCargoEjecutivo = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idCargoEjecutivo).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-TituloUniversitario').click(function(e) { var urlRequest = $(this).data('ria-url'); var idTituloUniversitario = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idTituloUniversitario).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-TituloPosgrado').click(function(e) { var urlRequest = $(this).data('ria-url'); var idTituloPosgrado = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idTituloPosgrado).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-Curso').click(function(e) { var urlRequest = $(this).data('ria-url'); var idCurso = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idCurso).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.ria-eliminar-ActividadDocente').click(function(e) { var urlRequest = $(this).data('ria-url'); var idActividadDocente = $(this).data('ria-id'); $.ajax({ // The URL for the request url: urlRequest, // The data to send (will be converted to a query string) // Whether this is a POST or GET request type: "POST", // The type of data we expect back dataType : "json", }) // Code to run if the request succeeds (is done); // The response is passed to the function .done(function( json ) { $("#" + idActividadDocente).parent().hide().next().show(); }) // Code to run if the request fails; the raw request and // status codes are passed to the function .fail(function( xhr, status, errorThrown ) { Swal.fire({ icon: 'error', title: 'Error', text: 'Falló la eliminación del archivo', }); }); }); $('.checkFechaFin').click(function(e) { {# Deshabilito la fecha fin en el caso de setear el checkbox #} $(this).parents('.rango_padre').find('.dateFechaFin').prop('disabled', $(this).is(":checked")) $(this).parents('.rango_padre').find('span.helper-text').css("display","none"); $(this).parents('.rango_padre').find('.dateFechaFin').removeClass("invalid valid"); }); $('.poderJudicial').click(function(e) { {# Deshabilito la partido y provincia en el caso de setear el checkbox de poder judicial #} $(this).parents('.territorio_padre').find('.ep_select_provincia').prop('disabled', $(this).is(":checked")); $(this).parents('.territorio_padre').find('.ep_select_partido').prop('disabled', $(this).is(":checked")); $('select').formSelect(); }); {# Navegación por sección de pasos #} $('.toSteps').click(function(e) { var destino = $(this).data('paso-ir'); const stepPrevioAlProximo = $(this).parents('li').prev(); if(stepPrevioAlProximo.length == 0 || !stepPrevioAlProximo.first().hasClass('disabled')) { var form = $('form'); $('').attr('type', 'hidden') .attr('name', 'paso_destino') .attr('value', destino) .appendTo(form); {# Submit del formulario #} form.submit(); } else { swal({ icon: 'warning', title: 'Alerta', text: 'No se puede acceder al paso seleccionado, sin haber completado los pasos previos', }); } }); $('#modalLaoding').modal({ dismissible: false, }); {# Validación desde el cliente #} $.validator.setDefaults({ errorClass: 'invalid', validClass: "valid", errorElement: "span", errorPlacement: function(error, element) { if(element.parents().hasClass('btn-circle')) { element = element.parent().parent().find('.file-path'); } element.nextAll('.helper-text').remove(); error .attr('class', "helper-text ") .attr('style', " color:#F44336; ") .attr('content', "attr(data-error)") .attr('data-error', error.text()) .insertAfter(element); }, submitHandler: function(form) { {% block jquery_validate_submitHandler %} $('#modalLaoding').modal({ dismissible: false, }); $('#modalLaoding').modal('open'); form.submit(); {% endblock %} }, invalidHandler: function(form, validator) { var errors = validator.numberOfInvalids(); if (errors) { if($(validator.errorList[0].element).is('input:text, input[type="number"]')){ validator.errorList[0].element.focus(); } else{ if($(validator.errorList[0].element).is(':not(input:file)')){ validator.errorList[0].element.parentElement.firstChild.focus(); } } } } }); $.validator.addMethod('filesize', function (value, element, param) { return this.optional(element) || (element.files[0].size <= param * 1000000) }, 'El archivo debe pesar menos que {0} MB'); $('#form_paso1').validate({ {% block jquery_validate %} rules: { {% block jquery_validate_rules %}{% endblock %} }, messages: { {% block jquery_validate_messages %}{% endblock %} } {% endblock %} }); {# FIN: Validación desde el cliente #} {% endblock %} {% block contenido_principal %}
edit_note

Registro Integral de Antecedentes


{% include 'ria/encabezado_pasos.html.twig' %}
{% block body %}{% endblock %}
{% endblock %}