Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
- <title>CITAS LEGALIZACIONES | MPPRE</title>
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/recursos/css/estilos.css" >
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/recursos/css/bootstrap.css" />
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/recursos/css/formValidation.min.css" >
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/recursos/css/datatables.min.css">
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/recursos/css/jquery-ui.css">
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/recursos/css/migas.css">
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/recursos/css/datepicker.min.css" />
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/recursos/css/datepicker3.min.css" />
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/recursos/css/jquery-confirm.css" />
- <link rel="stylesheet" type="text/css" href="http://citaslegalizaciones.mppre.gob.ve/application/libraries/Font/css/font-awesome.css">
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/jquery-2.1.1.min.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/bootstrap.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/jquery-1.9.1.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/bootstrap.min.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/datatables.min.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/formValidation.min.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/f_bootstrap.min.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/jquery-ui.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/jquery-confirm.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/bootstrap-datetimepicker.js"></script>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/HoldOn.js"></script>
- <link rel="stylesheet" href="http://citaslegalizaciones.mppre.gob.ve/application/libraries/dist/css/AdminLTE.css">
- <link rel="stylesheet" href="http://citaslegalizaciones.mppre.gob.ve/application/libraries/dist/css/skins/_all-skins.css">
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/libraries/dist/js/app.min.js"></script>
- </head>
- <body>
- <body class="skin-blue sidebar-mini sidebar">
- <div class="wrapper">
- <header class="main-header">
- <!-- Logo -->
- <a href="#" class="logo">
- <!-- mini logo for sidebar mini 50x50 pixels -->
- <span class="logo-mini"><b>S</b>DC</span>
- <!-- logo for regular state and mobile devices -->
- <span class="logo-lg"><b>CITAS</b></span>
- </a>
- <!-- Header Navbar: style can be found in header.less -->
- <nav class="navbar navbar-static-top">
- <!-- Sidebar toggle button-->
- <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
- <span class="sr-only"></span>
- </a>
- <div class="navbar-custom-menu">
- <ul class="nav navbar-nav">
- <li>
- <a href="http://citaslegalizaciones.mppre.gob.ve/administracion/usuarioModificar" data-toggle="tooltip" data-placement="top" class="navbar-link">Usuario:
- RAFAEL MARIA RIVAS ARNENSEN</a>
- </li>
- <li>
- <a href="http://citaslegalizaciones.mppre.gob.ve/principal/logout" data-toggle="tooltip" data-placement="top" title="Salir del Sistema"><span class="glyphicon glyphicon-log-in"></span> Salir</a>
- </li>
- </ul>
- </div>
- </nav>
- </header>
- </div>
- <aside class="main-sidebar">
- <!-- sidebar: style can be found in sidebar.less -->
- <section class="sidebar">
- <!-- Sidebar user panel -->
- <div class="user-panel">
- <div>
- <img src="http://citaslegalizaciones.mppre.gob.ve/application/libraries/dist/img/logoMPPRE2.png" width="210" height="80" alt="User Image">
- </div>
- </div>
- <ul class="sidebar-menu">
- <li class="header"><font color='white'> SISTEMA DE CITAS MPPRE</font></li>
- <li class="treeview">
- <a href="http://citaslegalizaciones.mppre.gob.ve/principal/bienvenida" >
- <i class="fa fa-calendar-plus-o"></i> <span>Citas</span>
- </a>
- </li>
- <li class="treeview">
- <a href="http://citaslegalizaciones.mppre.gob.ve/administracion/usuarioModificar" >
- <i class="fa fa-users"></i> <span>Datos del Usuario</span>
- </a>
- </li>
- </ul>
- </section>
- </aside>
- <div class="content-wrapper">
- <style>
- .modal-header{
- background-color:#0064b4 !important;
- }
- .modal-title{
- color:#ffffff;
- }
- #mdialTamanio{
- width: 60% !important;
- }
- </style>
- <script src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/js/bootbox.js"></script>
- <section class="content">
- <div class="box box-primary ">
- <div class="box-header with-border">
- <h3 class="box-title">Solicitante</h3>
- <div class="box-tools pull-right">
- <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
- </div>
- </div>
- <div class="box-body">
- <div class="row">
- <div class="col-md-12">
- <table class='tabla_lista table-responsive' >
- <thead>
- <th>Identificación </th>
- <th>Apellidos y Nombres </th>
- <th>Correo Electrónico </th>
- <th>Telefóno Local </th>
- <th>Telefóno Móvil </th>
- </thead>
- <tbody>
- <tr>
- <td> 7306327 </td>
- <td> RIVAS ARNENSEN RAFAEL MARIA </td>
- <td> rafaelmrivas@gmail.com </td>
- <td> 02418723346 </td>
- <td> 4165402380 </td>
- </tr>
- </tbody>
- </table>
- <table class='table-responsive' align="center">
- <td><button class="btn btn-primary " data-toggle="modal" data-target="#myModal">Agregar Hijo Menor</button></td>
- </table>
- <div class="col-sm-12"> </div>
- <div class="col-sm-4" align="right">Persona que asistirá a la Cita</div>
- <div class="col-sm-6" align="left">
- <select class="form-control" id="option" name="option">
- <option value="0">SELECCIONE...</option>
- <option value="1">Solicitante</option>
- <option value="2">Familiar: Cónyuge, Padres, Hijos o Hermanos</option>
- <option value="3">Representante Legal y / ó Apoderado</option>
- </select>
- </div>
- <div class="col-sm-12"> </div>
- <div class="col-sm-2"> </div>
- <div class="col-sm-8" id='solicitante'></div>
- <div class="col-sm-2"> </div>
- <div class="col-sm-12"> </div>
- <div id="familia" style="display:none;" >
- <form id="formulario2" action="" method="POST" name="formulario2">
- <div class="col-sm-12" id='resultado'></div>
- <table class='table-responsive' align="center">
- <td><strong>Se debe presentar según parentesco:
- Acta de Matrimonio o Partida de Nacimiento</strong></td>
- </table>
- <table class='tabla_lista table-responsive'>
- <tbody>
- <tr>
- <td>Identificación </td>
- <td><div class="col-sm-6">
- <select name="nacf" id="nacf" class="form-control text-uppercase" >
- <option value="">SELECCIONE...</option>
- <option value="V-">VENEZOLANO</option>
- <option value="E-">EXTRANJERO</option>
- <option value="P-">PASAPORTE</option>
- </select>
- </div>
- <div class="col-sm-6">
- <input class="form-control" autocomplete="off" name="cedulaf" id="cedulaf" >
- </div>
- </td>
- </tr>
- <tr>
- <td>Nombres</td>
- <td><div class="col-sm-12">
- <input type="text" class="form-control text-uppercase" id="nombresf" onKeyPress="return soloLetras(event)" name="nombresf" placeholder="Nombres" >
- </div>
- </td>
- </tr>
- <tr>
- <td>Apellidos</td>
- <td> <div class="col-sm-12"><input type="text" class="form-control text-uppercase" id="apellidosf" onKeyPress="return soloLetras(event)" name="apellidosf" placeholder="Apellidos" >
- </div>
- </td>
- </tr>
- <tr>
- <td>Telefóno</td>
- <td><div class="col-sm-12">
- <input class="form-control" name="tlff" id="tlff" onKeyPress="return soloNumeros(event)">
- </div>
- </td>
- </tr>
- <tr>
- <td>Dirección</td>
- <td><div class="col-sm-12">
- <textarea class="form-control text-uppercase" name="direccionf" id="direccionf" placeholder="dirección" rows="2"></textarea>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <div class=" col-sm-12">
- <table class='table-responsive' align="center">
- <td> <button type="" class="btn btn-success" id="guardar">
- <span class="ladda-label">Registrar</span>
- </button></td>
- </table>
- </div>
- </form>
- </div>
- <div id="representante" style="display:none;" >
- <form id="formulario3" action="" method="POST" name="formulario2">
- <div class="col-sm-12" id='resultado2'></div>
- <table class='table-responsive' align="center">
- <td><strong>EL APODERADO sólo puede tramitar hasta 12 documentos</strong></td>
- </table>
- <table class='tabla_lista table-responsive'>
- <tbody>
- <tr>
- <td>Identificación </td>
- <td><div class="col-sm-6">
- <select name="nacA" id="nacA" class="form-control text-uppercase" >
- <option value="">SELECCIONE...</option>
- <option value="V-">VENEZOLANO</option>
- <option value="E-">EXTRANJERO</option>
- <option value="P-">PASAPORTE</option>
- </select>
- </div>
- <div class="col-sm-6">
- <input class="form-control" autocomplete="off" name="cedulaA" id="cedulaA" >
- </div>
- </td>
- </tr>
- <tr>
- <td>Nombres</td>
- <td><div class="col-sm-12">
- <input type="text" class="form-control text-uppercase" id="nombresA" onKeyPress="return soloLetras(event)" name="nombresA" placeholder="Nombres" >
- </div>
- </td>
- </tr>
- <tr>
- <td>Apellidos</td>
- <td> <div class="col-sm-12"><input type="text" class="form-control text-uppercase" id="apellidosA" onKeyPress="return soloLetras(event)" name="apellidosA" placeholder="Apellidos" >
- </div>
- </td>
- </tr>
- <tr>
- <td>Telefóno</td>
- <td><div class="col-sm-12">
- <input class="form-control" name="tlfA" id="tlfA" onKeyPress="return soloNumeros(event)">
- </div>
- </td>
- </tr>
- <tr>
- <td>Dirección</td>
- <td><div class="col-sm-12">
- <textarea class="form-control text-uppercase" name="direccionA" id="direccionA" placeholder="dirección" rows="2"></textarea>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <div class=" col-sm-12">
- <table class='table-responsive' align="center">
- <td><button type="" class="btn btn-success" id="guardar2">
- <span class="ladda-label">Registrar</span>
- </button></td>
- </table>
- </div>
- </form>
- </div>
- <div id="botonS" style="display:none;" >
- <div class=" col-sm-12">
- <table class='table-responsive' align="center">
- <td><button type="" class="btn btn-primary" id="siguienteS">
- <span class="ladda-label">Siguiente</span>
- </button></td>
- </table>
- </div>
- </div>
- <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-dialog" id="mdialTamanio">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 class="modal-title" id="myModalLabel">Registrar los Hijos</h4>
- </div>
- <div class="modal-body">
- <div class="col-md-12">
- <div class="row">
- <form id="formulario" action="../cita/guardar_hijo_solicitante" method="POST" name="formulario">
- <div class="form-group">
- <div class="col-sm-3">
- <label>Nombres</label>
- <input type="text" class="form-control text-uppercase" id="nombres[]" onKeyPress="return soloLetras(event)" name="nombres[]" placeholder="Nombres" >
- </div>
- <div class="col-sm-4">
- <label>Apellidos</label>
- <input type="text" class="form-control text-uppercase" id="apellidos[]" onKeyPress="return soloLetras(event)" name="apellidos[]" placeholder="Apellidos" >
- </div>
- <div class="col-sm-4">
- <label>Fecha de Nacimiento</label>
- <div class="input-group input-append date" id="dueDatePicker">
- <span class="input-group-addon add-on"><span class="fa fa-calendar"></span></span>
- <input type="text" class="form-control text-uppercase" name="fecha[]" id="fecha[]" autocomplete="off" readonly="true" placeholder="fecha de nacimiento" />
- </div>
- </div>
- <div class="col-sm-1">
- <label>Agregar</label>
- <button type="button" class="btn btn-primary addButton" >+</button>
- </div>
- <div class="col-sm-12"> </div>
- </div>
- <!--=============================== Fila que se Clona =========================== -->
- <div class="form-group hide" id="bookTemplate">
- <div class="col-sm-3">
- <input type="text" class="form-control text-uppercase" id="nombres[]" onKeyPress="return soloLetras(event)" name="nombres[]" placeholder="Nombres" >
- </div>
- <div class="col-sm-4">
- <input type="text" class="form-control text-uppercase" id="apellidos[]" onKeyPress="return soloLetras(event)" name="apellidos[]" placeholder="Apellidos" >
- </div>
- <div class="col-sm-4">
- <div class="input-group input-append date" id="dueDatePicker">
- <span class="input-group-addon add-on"><span class="fa fa-calendar"></span></span>
- <input type="text" class="form-control text-uppercase" name="fecha[]" id="fecha[]" autocomplete="off" readonly="true" placeholder="fecha de nacimiento" />
- </div>
- </div>
- <div class="col-sm-1">
- <button type="button" class="btn btn-danger removeButton" >-</button>
- </div>
- <div class="col-sm-12"> </div>
- </div>
- <div class="col-sm-12"> </div>
- <div class=" col-sm-6">
- <button type="submit" class="btn btn-success">
- <span class="ladda-label">Registrar</span>
- </button>
- <button type="button" class="btn btn-warning" data-dismiss="modal">Cerrar</button>
- </div>
- </form>
- </div>
- </div>
- <div class="modal-footer">
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
- <input type="hidden" id="S" value="http://citaslegalizaciones.mppre.gob.ve/cita/solicitante">
- <input type="hidden" id="F" value="http://citaslegalizaciones.mppre.gob.ve/cita/familiar">
- <input type="hidden" id="A" value="http://citaslegalizaciones.mppre.gob.ve/cita/apoderado">
- <script>
- $(document).ready(function() {
- $('#siguienteS').click(function() {
- $("#solicitante").html("<div class='alert alert-success alert-dismissable'><button type='button' class='close' data-dismiss='alert'>×</button><i class='icon fa fa-check'></i> Continue con el Proceso.</div>");
- setInterval(function() {
- window.location.href = $("#S").val();
- }, 4000);
- });
- });
- $(document).ready(function() {
- $('#siguienteA').click(function() {
- $("#solicitante").html("<div class='alert alert-success alert-dismissable'><button type='button' class='close' data-dismiss='alert'>×</button><i class='icon fa fa-check'></i> Continue con el Proceso.</div>");
- setInterval(function() {
- window.location.href = $("#A").val();
- }, 4000);
- });
- });
- $(document).ready(function() {
- $('#siguientef').click(function() {
- $("#solicitante").html("<div class='alert alert-success alert-dismissable'><button type='button' class='close' data-dismiss='alert'>×</button><i class='icon fa fa-check'></i> Continue con el Proceso.</div>");
- setInterval(function() {
- window.location.href = $("#F").val();
- }, 4000);
- });
- });
- $(document).ready(function() {
- $('#option').change(function() {
- var option = $('#option').val();
- if (option == '0') {
- document.getElementById('botonS').style.display = 'none';
- document.getElementById('familia').style.display = 'none';
- document.getElementById('representante').style.display = 'none';
- }
- else if (option == '1') {
- document.getElementById('botonS').style.display = 'block';
- document.getElementById('familia').style.display = 'none';
- document.getElementById('representante').style.display = 'none';
- }
- else if (option == '2') {
- document.getElementById('botonS').style.display = 'none';
- document.getElementById('familia').style.display = 'block';
- document.getElementById('representante').style.display = 'none';
- } else {
- document.getElementById('botonS').style.display = 'none';
- document.getElementById('familia').style.display = 'none';
- document.getElementById('representante').style.display = 'block';
- }
- });
- });
- $(document).ready(function() {
- $("#guardar2").click(function() {//evento javascript onclick
- // Declaracion de variables
- var dataUser = {
- "nac": $("#nacA").val(),
- "cedula": $("#cedulaA").val(),
- "nombres": $("#nombresA").val(),
- "apellidos": $("#apellidosA").val(),
- "fecha": $("#fechaA").val(),
- "tel": $("#tlfA").val(),
- "direccion": $("#direccionA").val()
- };
- //validamos que no quede ningun campo vacio
- if (dataUser.cedula === '' || dataUser.nac === '' || dataUser.nombres === ''
- || dataUser.apellidos === ''
- || dataUser.fecha === '' || dataUser.tel === '' || dataUser.direccion === ''
- ) {
- // mensaje en caso de que exista un campo vacio del formulario
- $("#resultado2").html("<div class='alert alert-warning alert-dismissable'><button type='button' class='close' data-dismiss='alert'>×</button><i class='icon fa fa-warning'></i> Alerta...! Informacion Incompleta, debe llenar todos los campos....</div>");
- //En caso contrario que no hayan campos vacios enviamos los parametros por ajax
- } else {
- $.ajax({
- type: 'POST',
- dataType: 'html',
- data: dataUser,
- url: "http://citaslegalizaciones.mppre.gob.ve/cita/guardar_apoderado_solicitante",
- // mostramos un loader antes de enviar los datos
- beforeSend: function() {
- $("#resultado2").show();
- $("#resultado2").html('<div><img width="2%" src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/imagenes/ajax-loader_1.gif"></div>');
- },
- //Despues de enviar los datos limpiamos los campos del formulario
- success: function(respuesta) {
- // Enviamos un mensaje de exito al insertar los datos
- $("#resultado2").html("<div class='alert alert-success alert-dismissable'><button type='button' class='close' data-dismiss='alert'>×</button><i class='icon fa fa-check'></i> Los Datos Fueron registrados Exitosamente.</div>");
- }
- });
- setInterval(function() {
- window.location.href = $("#A").val();
- }, 4000);
- }
- });
- });
- $(document).ready(function() {
- $("#guardar").click(function() {//evento javascript onclick
- // Declaracion de variables
- var dataUser = {
- "nac": $("#nacf").val(),
- "cedula": $("#cedulaf").val(),
- "nombres": $("#nombresf").val(),
- "apellidos": $("#apellidosf").val(),
- "fecha": $("#fechaf").val(),
- "tel": $("#tlff").val(),
- "direccion": $("#direccionf").val()
- };
- //validamos que no quede ningun campo vacio
- if (dataUser.cedula === '' || dataUser.nac === '' || dataUser.nombres === ''
- || dataUser.apellidos === ''
- || dataUser.fecha === '' || dataUser.tel === '' || dataUser.direccion === ''
- ) {
- // mensaje en caso de que exista un campo vacio del formulario
- $("#resultado").html("<div class='alert alert-warning alert-dismissable'><button type='button' class='close' data-dismiss='alert'>×</button><i class='icon fa fa-warning'></i> Alerta...! Informacion Incompleta, debe llenar todos los campos....</div>");
- //En caso contrario que no hayan campos vacios enviamos los parametros por ajax
- } else {
- $.ajax({
- type: 'POST',
- dataType: 'html',
- data: dataUser,
- url: "http://citaslegalizaciones.mppre.gob.ve/cita/guardar_familiar_solicitante",
- // mostramos un loader antes de enviar los datos
- beforeSend: function() {
- $("#resultado").show();
- $("#resultado").html('<div><img width="2%" src="http://citaslegalizaciones.mppre.gob.ve/application/recursos/imagenes/ajax-loader_1.gif"></div>');
- },
- //Despues de enviar los datos limpiamos los campos del formulario
- success: function(respuesta) {
- // Enviamos un mensaje de exito al insertar los datos
- $("#resultado").html("<div class='alert alert-success alert-dismissable'><button type='button' class='close' data-dismiss='alert'>×</button><i class='icon fa fa-check'></i>Los Datos Fueron registrados Exitosamente.</div>");
- }
- });
- setInterval(function() {
- window.location.href = $("#F").val();
- }, 4000);
- }
- });
- });
- $('#formulario3').formValidation({
- framework: 'bootstrap',
- fields: {
- nacA: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- cedulaA: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- nombresA: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- apellidosA: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- tlfA: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- },
- phone: {
- country: 'VE',
- message: 'El numero no es valido para %s'
- }
- }
- }
- }
- });
- $('#formulario2').formValidation({
- framework: 'bootstrap',
- fields: {
- nacf: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- cedulaf: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- nombresf: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- apellidosf: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- tlff: {
- row: '.col-sm-12',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- },
- phone: {
- country: 'VE',
- message: 'El numero no es valido para %s'
- }
- }
- }
- }
- });
- $(document).ready(function() {
- $('#formulario').formValidation({
- framework: 'bootstrap',
- fields: {
- 'apellidos[]': {
- // The task is placed inside a .col-xs-6 element
- row: '.col-sm-4',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- 'nombres[]': {
- // The due date is placed inside a .col-xs-4 element
- row: '.col-sm-3',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- },
- 'fecha[]': {
- // The due date is placed inside a .col-xs-4 element
- row: '.col-sm-4',
- validators: {
- notEmpty: {
- message: 'CAMPO OBLIGATORIO'
- }
- }
- }
- }
- }).on('added.field.fv', function(e, data) {
- if (data.field === 'fecha[]') {
- // The new due date field is just added
- // Create a new date picker
- data.element
- .parent()
- .datepicker({
- format: 'dd-mm-yyyy',
- autoclose: true
- })
- .on('changeDate', function(evt) {
- // Revalidate the date field
- $('#formulario').formValidation('revalidateField', data.element);
- });
- }
- }).on('click', '.addButton', function() {
- var $template = $('#bookTemplate'),
- $clone = $template
- .clone()
- .removeClass('hide')
- .removeAttr('id')
- .insertBefore($template);
- $('#formulario')
- .formValidation('addField', $clone.find('[name="nombres[]"]'))
- .formValidation('addField', $clone.find('[name="apellidos[]"]'))
- .formValidation('addField', $clone.find('[name="fecha[]"]'));
- })
- // Remove button click handler
- .on('click', '.removeButton', function() {
- var $row = $(this).closest('.form-group');
- // Remove fields
- $('#formulario')
- .formValidation('removeField', $row.find('[name="nombres[]"]'))
- .formValidation('removeField', $row.find('[name="apellidos[]"]'))
- .formValidation('removeField', $row.find('[name="fecha[]"]'));
- // Remove element containing the fields
- $row.remove();
- });
- });</script>
- <script type="text/javascript">
- $('#dueDatePicker').datepicker({
- format: 'dd-mm-yyyy',
- autoclose: true
- }).on('changeDate', function(evt) {
- // Revalidate the date field
- $('#formulario').formValidation('revalidateField', $('#dueDatePicker').find('[name="fecha"]'));
- });
- function soloLetras(e) {
- key = e.keyCode || e.which;
- tecla = String.fromCharCode(key).toLowerCase();
- letras = " qwertyuiop?lkjhgfdsazxcvbnm";
- especiales = "8-37-39-46";
- tecla_especial = false
- for (var i in especiales) {
- if (key == especiales[i]) {
- tecla_especial = true;
- break;
- }
- }
- if (letras.indexOf(tecla) == -1 && !tecla_especial) {
- return false;
- }
- }
- function soloNumeros(e)
- {
- var key = window.Event ? e.which : e.keyCode
- return ((key >= 48 && key <= 57) || (key == 8))
- }
- $(document).ready(function() {
- $("#nacA").change(function() {
- $("#nombresA").val('');
- $("#apellidosA").val('');
- $("#cedulaA").val('');
- $("#cedulaA").blur(function()
- {
- var nac = document.getElementById("nac").value;
- var cedula = document.getElementById("cedula").value;
- $.ajax({
- type: "GET",
- url: "http://citaslegalizaciones.mppre.gob.ve/api-services/index.php/personas/cedulanac/" + nac + cedula,
- dataType: "json",
- success: function(data) {
- if (data == 404) {
- $("#nombresA").val('');
- $("#apellidosA").val('');
- $('#nombresA').removeAttr("readonly");
- $('#apellidosA').removeAttr("readonly");
- } else {
- var obj = eval("(" + JSON.stringify(data) + ")");
- $('#nombresA').attr("readonly", true);
- $('#apellidosA').attr("readonly", true);
- if (obj.response.segundo_nombre == null) {
- $("#nombresA").val(obj.response.primer_nombre);
- } else {
- $("#nombresA").val((obj.response.primer_nombre) + ' ' + (obj.response.segundo_nombre));
- }
- if (obj.response.segundo_apellido == null) {
- $("#apellidosA").val(obj.response.primer_apellido);
- } else {
- $("#apellidosA").val((obj.response.primer_apellido) + ' ' + (obj.response.segundo_apellido));
- }
- }
- }
- });
- });
- });
- });
- $(document).ready(function() {
- $("#nacf").change(function() {
- $("#nombresf").val('');
- $("#apellidosf").val('');
- $("#cedulaf").val('');
- $("#cedulaf").blur(function()
- {
- var nac = document.getElementById("nac").value;
- var cedula = document.getElementById("cedula").value;
- $.ajax({
- type: "GET",
- url: "http://citaslegalizaciones.mppre.gob.ve/api-services/index.php/personas/cedulanac/" + nac + cedula,
- dataType: "json",
- success: function(data) {
- if (data == 404) {
- $("#nombresf").val('');
- $("#apellidosf").val('');
- $('#nombresf').removeAttr("readonly");
- $('#apellidosf').removeAttr("readonly");
- } else {
- var obj = eval("(" + JSON.stringify(data) + ")");
- $('#nombresf').attr("readonly", true);
- $('#apellidosf').attr("readonly", true);
- if (obj.response.segundo_nombre == null) {
- $("#nombresf").val(obj.response.primer_nombre);
- } else {
- $("#nombresf").val((obj.response.primer_nombre) + ' ' + (obj.response.segundo_nombre));
- }
- if (obj.response.segundo_apellido == null) {
- $("#apellidosf").val(obj.response.primer_apellido);
- } else {
- $("#apellidosf").val((obj.response.primer_apellido) + ' ' + (obj.response.segundo_apellido));
- }
- }
- }
- });
- });
- });
- });
- </script>
- <style>
- /* Sticky footer styles
- -------------------------------------------------- */
- html,
- body {
- height: 100%;
- /* The html and body elements cannot have any padding or margin. */
- }
- /* Wrapper for page content to push down footer */
- #wrap {
- min-height: 100%;
- height: auto !important;
- height: 100%;
- /* Negative indent footer by its height */
- margin: 0 auto -30px;
- /* Pad the bottom by footer height */
- padding: 0 0 30px;
- }
- /* Set the fixed height of the footer here */
- footer {
- height: 30px;
- background-color: lightblue;
- }
- /* Custom page CSS
- -------------------------------------------------- */
- footer > p {
- padding: 0 125px;
- }
- </style>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement