1// JavaScript Document 2 3$(function() { 4 5 6 $("#frmAddContacto").validate({ 7 submitHandler: function(form){ 8 9 $(form).ajaxSubmit({ 10 dataType: 'json', 11 success: function(jsonData, statusText, xhr){ 12 13 if (jsonData.status == false){ 14 15 } else { 16 17 } 18 19 } 20 21 }); 22 }, 23 24 rules:{ 25 'nombre': { 26 required: true, 27 minlength: 3 28 }, 29 'apellido': { 30 required: true, 31 minlength: 3 32 }, 33 'edad': { 34 required: true, 35 minlength: 1 36 }, 37 'celular': { 38 required: true, 39 minlength: 8 40 }, 41 'email': { 42 required: true, 43 email: true, 44 minlength: 4 45 }, 46 'localidad': { 47 required: true, 48 minlength: 3 49 }, 50 'consulta': { 51 required: true, 52 minlength: 10 53 }, 54 } 55 }); 56 57 58 $("#frmAddContactoPre").validate({ 59 60 submitHandler: function(form){ 61 62 $(form).ajaxSubmit({ 63 dataType: 'json', 64 success: function(jsonData, statusText, xhr){ 65 66 if (jsonData.status == false){ 67 68 } else { 69 70 } 71 72 } 73 74 }); 75 }, 76 77 rules:{ 78 'nombre': { 79 required: true, 80 minlength: 3 81 }, 82 'apellido': { 83 required: true, 84 minlength: 3 85 }, 86 'archivo1': { 87 required: true 88 }, 89 'archivo2': { 90 required: true 91 }, 92 'archivo3': { 93 required: true 94 }, 95 'celular': { 96 required: true, 97 minlength: 8 98 }, 99 'email': { 100 required: true, 101 email: true, 102 minlength: 4 103 }, 104 'localidad': { 105 required: true, 106 minlength: 3 107 }, 108 'direccion': { 109 required: true, 110 minlength: 3 111 }, 112 113 'dni': { 114 required: true, 115 minlength: 7 116 }, 117 'nro': { 118 required: true, 119 minlength: 1 120 }, 121 'cp': { 122 required: true, 123 minlength: 1 124 }, 125 'anio': { 126 required: true 127 }, 128 'mes': { 129 required: true 130 }, 131 'dia': { 132 required: true 133 }, 134 'mest': { 135 required: true 136 }, 137 'aniot': { 138 required: true 139 }, 140 'nrot': { 141 required: true, 142 minlength: 16 143 }, 144 'solo': { 145 required: true 146 }, 147 'confirmar3': { 148 required: true 149 }, 150 'confirmar2': { 151 required: true 152 }, 153 'confirmar': { 154 required: true 155 } 156 157 } 158 }); 159 160 $("#frmAddContactoPreNew").validate({ 161 submitHandler: function(form){ 162 163 var a1 = $('#doc_id').val(); 164 var a2 = $('#doc_id2').val(); 165 166 if(a1 == ""){ 167 alert("Debe subir su dni"); 168 return false; 169 } 170 if(a2 == ""){ 171 alert("Debe subir su titulo"); 172 return false; 173 } 174 175 $(form).ajaxSubmit({ 176 dataType: 'json', 177 success: function(jsonData, statusText, xhr){ 178 179 if (jsonData.status == false){ 180 181 } else { 182 183 } 184 185 } 186 187 }); 188 }, 189 190 rules:{ 191 'nombre': { 192 required: true, 193 minlength: 3 194 }, 195 'apellido': { 196 required: true, 197 minlength: 3 198 }, 199 200 'celular': { 201 required: true, 202 minlength: 8 203 }, 204 'email': { 205 required: true, 206 email: true, 207 minlength: 4 208 }, 209 'tel': { 210 required: true, 211 email: true, 212 minlength: 4, 213 equalTo: '#email' 214 }, 215 'localidad': { 216 required: true, 217 minlength: 3 218 }, 219 'direccion': { 220 required: true, 221 minlength: 3 222 }, 223 224 'dni': { 225 required: true, 226 minlength: 7 227 }, 228 'nro': { 229 required: true, 230 minlength: 1 231 }, 232 'cp': { 233 required: true, 234 minlength: 1 235 }, 236 'anio': { 237 required: true 238 }, 239 'mes': { 240 required: true 241 }, 242 'dia': { 243 required: true 244 }, 245 'curso': { 246 required: true 247 } 248 249 } 250 }); 251 $("#frmAddContactoPreNew2").validate({ 252 submitHandler: function(form){ 253 254 255 256 $(form).ajaxSubmit({ 257 dataType: 'json', 258 success: function(jsonData, statusText, xhr){ 259 260 if (jsonData.status == false){ 261 262 } else { 263 264 } 265 266 } 267 268 }); 269 }, 270 271 rules:{ 272 'nombre': { 273 required: true, 274 minlength: 3 275 }, 276 'apellido': { 277 required: true, 278 minlength: 3 279 }, 280 281 'celular': { 282 required: true, 283 minlength: 8 284 }, 285 'email': { 286 required: true, 287 email: true, 288 minlength: 4 289 }, 290 'localidad': { 291 required: true, 292 minlength: 3 293 }, 294 'direccion': { 295 required: true, 296 minlength: 3 297 }, 298 299 'dni': { 300 required: true, 301 minlength: 7 302 }, 303 'nro': { 304 required: true, 305 minlength: 1 306 }, 307 'cp': { 308 required: true, 309 minlength: 1 310 }, 311 'anio': { 312 required: true 313 }, 314 'mes': { 315 required: true 316 }, 317 'dia': { 318 required: true 319 }, 320 'curso': { 321 required: true 322 } 323 324 } 325 }); 326 327 328 329$("#frmAddContactob").validate({ 330 submitHandler: function(form){ 331
332 $(form).ajaxSubmit({ 333 dataType: 'json', 334 success: function(jsonData, statusText, xhr){ 335 336 if (jsonData.status == false){ 337 338 } else { 339 340 } 341 342 } 343 344 }); 345 }, 346 347 rules:{ 348 'nombre': { 349 required: true, 350 minlength: 3 351 }, 352 'apellido': { 353 required: true, 354 minlength: 3 355 }, 356 'edad': { 357 required: true, 358 minlength: 1 359 }, 360 'celular': { 361 required: true, 362 minlength: 8 363 }, 364 'email': { 365 required: true, 366 email: true, 367 minlength: 4 368 }, 369 'localidad': { 370 required: true, 371 minlength: 3 372 }, 373 'consulta': { 374 required: true, 375 minlength: 10 376 }, 377 } 378 }); 379 380 381$("#frmAddContactotramite").validate({ 382 submitHandler: function(form){ 383 384 $(form).ajaxSubmit({ 385 dataType: 'json', 386 success: function(jsonData, statusText, xhr){ 387 388 if (jsonData.status == false){ 389 390 } else { 391 392 } 393 394 } 395 396 }); 397 }, 398 399 rules:{ 400 'consulta': { 401 required: true, 402 minlength: 3 403 }, 404 'email': { 405 required: true, 406 email: true, 407 minlength: 4 408 }, 409 410 } 411 }); 412 413 414 $('#frmAddCurso').each(function(){ 415 var aForm = $(this); 416 417 aForm.validate({ 418 errorElement: 'span', //default input error message container 419 errorClass: 'help-block help-block-error', // default input error message class 420 focusInvalid: false, // do not focus the last invalid input 421 ignore: "", // validate all fields including form hidden input 422 423 errorPlacement: function (error, element) { // render error placement for each input type 424 if (element.parent(".input-group").size() > 0) { 425 error.insertAfter(element.parent(".input-group")); 426 } else if (element.attr("data-error-container")) { 427 error.appendTo(element.attr("data-error-container")); 428 } else if (element.parents('.radio-list').size() > 0) { 429 error.appendTo(element.parents('.radio-list').attr("data-error-container")); 430 } else if (element.parents('.radio-inline').size() > 0) { 431 error.appendTo(element.parents('.radio-inline').attr("data-error-container")); 432 } else if (element.parents('.checkbox-list').size() > 0) { 433 error.appendTo(element.parents('.checkbox-list').attr("data-error-container")); 434 } else if (element.parents('.checkbox-inline').size() > 0) { 435 error.appendTo(element.parents('.checkbox-inline').attr("data-error-container")); 436 } else { 437 error.insertAfter(element); // for other inputs, just perform default behavior 438 } 439 }, 440 441 442 highlight: function (element) { // hightlight error inputs 443 $(element) 444 .closest('.form-group').addClass('has-error'); // set error class to the control group 445 }, 446 447 unhighlight: function (element) { // revert the change done by hightlight 448 $(element) 449 .closest('.form-group').removeClass('has-error'); // set error class to the control group 450 }, 451 452 error: function(){ 453 alert('error'); 454 }, 455 456 success: function (label) { 457 label 458 .addClass('valid').addClass('help-inline ok') // mark the current input as valid and display OK icon 459 .closest('.form-group').removeClass('has-error').addClass('has-success'); // set success class to the control group 460 }, 461 462 submitHandler: function (form) { 463 464 /*if ($(form).find('#files-container').find('.btn-process').size() > 0){ 465 466 $(form).find('fieldset').attr('disabled',true); 467 $(form).find('#files-container').find('.btn-process').each(function(){ 468 var aData = $(this).data(); 469 var aBtn = $(this); 470 aData.submit().always(function () { 471 aBtn.html('Subido!').removeClass('btn-primary').addClass('btn-success'); 472 }); 473 }); 474 475 return false; 476 } else {*/ 477 submitForm(); 478 //} 479 480 } 481 }); 482 483 }); 484 485 486 487 var submitForm = function(){ 488 489 WebDialogs.doConfirm({ 490 message: 'Está por inscribirse al curso seleccionado, por favor confirme la operación para continuar.', 491 title: '¿Está seguro de querer inscribirse al Curso Seleccionado?', 492 onConfirm: function(){ 493 494 var form = $('#frmAddCurso');
495 $(form).ajaxSubmit({ 496 dataType: 'json', 497 type: 'post', 498 beforeSubmit: function(formData, jqForm, options){ 499 $(jqForm[0]).find('button[type="submit"]').html('Enviando...').attr('disabled','disabled'); 500 var span = $('<span>').addClass('loading'); 501 var icon = $('<i>').addClass('fa fa-circle-o-notch fa-spin'); 502 $(jqForm[0]).find('button[type="submit"]').parent().append(span.append(' ').append(icon).append(' Validando datos ')); 503 }, 504 success: function(jsonData, statusText, xhr, jqForm){ 505 $(jqForm[0]).find('button[type="submit"]').html('Guardar').removeAttr('disabled'); 506 $(jqForm[0]).find('span.loading').remove(); 507 if (jsonData.status == true){ 508 window.location.href = __SITEURL+'user/insJson/'+jsonData.curso+'/'+jsonData.donde+'/'+jsonData.id; 509 } else { 510 window.location.href = __SITEURL+'user/logout'; 511 } 512 513 // alert(jsonData.message); 514 515 } 516 }); 517 518 } 519 }); 520 521 522 523 } 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540$("#frmAddContactob2").validate({ 541 submitHandler: function(form){ 542 543 $(form).ajaxSubmit({ 544 dataType: 'json', 545 success: function(jsonData, statusText, xhr){ 546 547 if (jsonData.status == false){ 548 549 } else { 550 551 } 552 553 } 554 555 }); 556 }, 557 558 rules:{ 559 'nombre2': { 560 required: true, 561 minlength: 3 562 }, 563 'apellido2': { 564 required: true, 565 minlength: 3 566 }, 567 'edad': { 568 required: true, 569 minlength: 1 570 }, 571 'celular2': { 572 required: true, 573 minlength: 8 574 }, 575 'email2': { 576 required: true, 577 email: true, 578 minlength: 4 579 }, 580 'localidad': { 581 required: true, 582 minlength: 3 583 }, 584 'consulta2': { 585 required: true, 586 minlength: 10 587 }, 588 } 589 }); 590 591 592 593$("#frmAddOnline").validate({ 594 submitHandler: function(form){ 595 596 $(form).ajaxSubmit({ 597 dataType: 'json', 598 success: function(jsonData, statusText, xhr){ 599 600 if (jsonData.status == false){ 601 602 } else { 603 604 } 605 606 } 607 608 }); 609 }, 610 611 rules:{ 612 'nombre': { 613 required: true, 614 minlength: 3 615 }, 616 'apellido': { 617 required: true, 618 minlength: 3 619 }, 620 'telefono': { 621 required: true, 622 minlength: 8 623 }, 624 'dni': { 625 required: true, 626 minlength: 8 627 }, 628 'email': { 629 required: true, 630 email: true, 631 minlength: 4 632 } 633 634 635 } 636 }); 637 638$("#frmAddOnline3").validate({ 639 submitHandler: function(form){ 640 641 $(form).ajaxSubmit({ 642 dataType: 'json', 643 success: function(jsonData, statusText, xhr){ 644 645 if (jsonData.status == false){ 646 647 } else { 648 649 } 650 651 } 652 653 }); 654 }, 655 656 rules:{ 657 'nombre': { 658 required: true, 659 minlength: 3 660 }, 661 'apellido': { 662 required: true, 663 minlength: 3 664 }, 665 'telefono': { 666 required: true, 667 minlength: 8 668 }, 669 'dni': { 670 required: true, 671 minlength: 7 672 }, 673 'email': { 674 required: true, 675 email: true, 676 minlength: 4 677 } 678 679 } 680 }); 681 682$("#frmAddDebito").validate({ 683 submitHandler: function(form){ 684 685 $(form).ajaxSubmit({ 686 dataType: 'json', 687 success: function(jsonData, statusText, xhr){ 688 689 if (jsonData.status == false){ 690 691 } else { 692 693 } 694 695 } 696 697 }); 698 }, 699 700 rules:{ 701 'socio': { 702 required: true, 703 minlength: 3 704 }, 705 'titular': { 706 required: true, 707 minlength: 3 708 }, 709 'dni': { 710 required: true, 711 minlength: 8 712 }, 713 'nro': { 714 required: true, 715 minlength: 15 716 }, 717 'acepto': { 718 required: true, 719 720 } 721 722 723 } 724 }); 725 726 727$("#frmAddContactobajas").validate({ 728 submitHandler: function(form){ 729 730 $(form).ajaxSubmit({ 731 dataType: 'json', 732 success: function(jsonData, statusText, xhr){ 733 734 if (jsonData.status == false){ 735 736 } else { 737 738 } 739 740 } 741 742 }); 743 }, 744 745 rules:{ 746 'comentario': { 747 required: true, 748 minlength: 10 749 } 750 751 } 752 }); 753 754 755 756 757}); 758
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.