1function enviarFormulario() { 2 try { 3 4 if(_contactInfo === undefined || _contactInfo === null){ 5 wrongContactConfig(); 6 return false; 7 } 8 if(_contactInfo.mailTo.indexOf(' ') > 0){ 9 wrongContactConfig(); 10 return false; 11 } 12 13 if(_contactInfo.mailTo.indexOf(' ') < 0){ 14 console.log('startProgress'); 15 startProgress(); 16 let titles = _contactInfo.titles; 17 let values = [ 18 $('#contactName').val(), 19 $('#contactEmail').val(), 20 $('#contactPhone').val(), 21 $('#contactSubject').val(), 22 $('#contactMessage').val() 23 ]; 24 if($('#checkFormNews').is(':checked')){ 25 var objRequest = { 26 BaseText: _contactInfo.baseText, 27 MailTo: _contactInfo.mailTo, 28 MailSubject: _contactInfo.mailSubject, 29 Titles: titles, 30 Values: values 31 }; 32 console.log(objRequest); 33 $.ajax({ 34 type: 'POST', 35 url: '/umbraco/api/ContactUs/SendEmail', 36 data: JSON.stringify(objRequest), 37 contentType: 'application/json; utf-8', 38 dataType: 'json', 39 success: function (data) { 40 var response = data; 41 if (response.succeded) { 42 endProgress(); 43 $("#contactFormKali").trigger("reset"); 44 jAlert(_contactInfo.successMessage, _contactInfo.successTitle); 45 console.log(response); 46 return false; 47 } else { 48 endProgress(); 49 jWarning(_contactInfo.errorMessage, _contactInfo.errorTitle); 50 $("#contactFormKali").trigger("reset"); 51 console.log(response); 52 return false; 53 } 54 }, 55 error: function (jqXHR, textStatus, errorThrown) { 56 endProgress(); 57 console.log(jqXHR); 58 return false; 59 } 60 }); 61 }else{ 62 jWarning("Debe de aceptar los términos y condiciones"); 63 } 64 } else { 65 jWarning(_contactInfo.errorMessage, _contactInfo.errorTitle); 66 } 67 } catch (error) { 68 console.log(error); 69 wrongContactConfig(); 70 return false; 71 } 72 73 return false; 74} 75 76function enablelgn() { 77 var v = grecaptcha.getResponse(); 78 if (v.length == 0) { 79 disabledlgn(); 80 } 81 if (v.length != 0) { 82 hideById('divCaptcha'); 83 $('#divlogin').html(` 84 <div class="btnAactions btn--center"> 85 <button class="action-button" type="submit" aria-label="Enviar Mensaje">${_SendMessage}</button> 86 </div>`); 87 elgn = true; 88 } 89} 90 91function disabledlgn() { 92 showById('divCaptcha'); 93 $('#divlogin').html(''); 94 elgn = false; 95} 96 97function showById(id) { 98 if (!$('#' + id).is(':visible')) { $('#' + id).slideToggle(); } 99} 100 101function hideById(id) { 102 if ($('#' + id).is(':visible')) { $('#' + id).slideToggle(); } 103}
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.