1document.addEventListener('DOMContentLoaded', function(e) { 2 3 // Event: "Add Location"-Form send 4 jQuery('#oum_add_location').submit(function(event) { 5 6 jQuery('#oum_submit_btn').addClass('oum-loading'); 7 8 event.preventDefault(); 9 let formData = new FormData(this); 10 11 formData.append('action','oum_add_location_from_frontend'); 12 13 jQuery.ajax({ 14 type: 'POST', 15 url: oum_ajax.ajaxurl, 16 cache: false, 17 contentType: false, 18 processData: false, 19 data: formData, 20 success: function (response, textStatus, XMLHttpRequest) { 21 jQuery('#oum_submit_btn').removeClass('oum-loading'); 22 23 if(response.success == false) { 24 oumShowError(response.data); 25 } 26 if(response.success == true) { 27 jQuery('#oum_add_location').trigger('reset'); 28 29 if(oum_action_after_submit == 'refresh') { 30 oumRefresh(); 31 }else if(oum_action_after_submit == 'redirect' && thankyou_redirect !== '') { 32 oumRedirect(thankyou_redirect); 33 }else{ 34 oumShowThankYou(); 35 } 36 } 37 }, 38 error: function (XMLHttpRequest, textStatus, errorThrown) { 39 console.log(errorThrown); 40 } 41 }); 42 }); 43 44 function oumShowThankYou() { 45 jQuery('#oum_add_location').hide(); 46 jQuery('#oum_add_location_error').hide(); 47 jQuery('#oum_add_location_thankyou').show(); 48 } 49 50 function oumRefresh() { 51 window.location.reload(); 52 } 53 54 function oumRedirect(url) { 55 window.location.href = url; 56 } 57 58 function oumShowError(errors) { 59 const errorWrapEl = jQuery('#oum_add_location_error'); 60 errorWrapEl.html(''); 61 errors.forEach(error => { 62 errorWrapEl.append(error.message + '<br>'); 63 }); 64 errorWrapEl.show(); 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.