1$('#contact-form').on('shown.bs.modal', function (e) { 2 $("#contactForm").validator().on("submit", function(e) { 3 /*var recaptcha = document.forms["contactForm"]["g-recaptcha-response"].value; 4 if (recaptcha == "") { 5 alert("Please fill reCAPTCHA"); 6 return false; 7 } */ 8 if (e.isDefaultPrevented()) { 9 //alert("The form is not completed correctly"); 10 } else { 11 var postData = $(this).serialize(); 12 var formURL = $(this).attr("action"); //"submit.php"; 13 $.ajax({ 14 url: formURL, 15 type: "POST", 16 data: postData, 17 success: function(data, textStatus, jqXHR) { 18 //$('#contact-form .modal-header .modal-title').html("Results"); 19 $('#contact-form .modal-body').fadeOut('slow', function(){ 20 $('#contact-form .modal-body').html(data); 21 $('#contact-form .modal-body').fadeIn('slow'); 22 $("#submitContactForm").remove(); 23 24 }); 25 }, 26 error: function(jqXHR, status, error) { 27 console.log(status + ": " + error); 28 } 29 }); 30 e.preventDefault(); 31 } 32 }); 33 34/* .on('hidden.bs.modal', function (e) { 35 $(this).find('form')[0].reset(); 36 }); 37must apply only after HTML has loaded */ 38 }); 39$('#mailinglist-form').on('shown.bs.modal', function (e) { 40 $("#mailchimpFormModal").validator().on("submit", function(e) { 41 if (e.isDefaultPrevented()) { 42 alert("The form is not completed correctly"); 43 } else { 44 var postData = $(this).serialize(); 45 var formURL = $(this).attr("action"); //"submit.php"; 46 $.ajax({ 47 url: formURL, 48 type: "POST", 49 data: postData, 50 success: function(data, textStatus, jqXHR) { 51 //$('#mailinglist-form .modal-header .modal-title').html("Results"); 52 $('#mailinglist-form .modal-body').fadeOut('slow', function(){ 53 $('#mailinglist-form .modal-body').html("Grazie! Riceverai una mail per confermare la tua iscrizione."); 54 $('#mailinglist-form .modal-body').fadeIn('slow'); 55 $("#submitMailingForm").remove(); 56 }); 57 58 }, 59 error: function(jqXHR, status, error) { 60 console.log(status + ": " + error); 61 } 62 }); 63 e.preventDefault(); 64 } 65 }); 66});
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.