1jQuery(document).ready(function () { 2 3 jQuery('#smt_payment_form_donation input[name=amount]').on('blur, change', function () { 4 var amount = jQuery('#smt_payment_form_donation input[name=amount]').val().replace(/^\s+|\s+$/g, ''); 5 if ((jQuery('#smt_payment_form_donation input[name=amount]').val() !== '') && (!amount.match(/^$/))) { 6 jQuery('#smt_payment_form_donation input[name=amount]').val(parseInt(amount).toFixed(3)); 7 8 jQuery('#smt_payment_form_donation .list-radios-amount .radio input[type=radio]').each(function () { 9 if (amount !== jQuery(this).val()) { 10 jQuery(this).prop('checked', false); 11 } else { 12 jQuery(this).prop('checked', true); 13 } 14 }); 15 } 16 }); 17 18 jQuery('#smt_payment_form_donation .list-radios-amount .radio input[type=radio]').on('change', function () { 19 var RadioVal = jQuery(this).val().replace(/^\s+|\s+$/g, ''); 20 if ((RadioVal !== '') && (!RadioVal.match(/^$/))) { 21 jQuery('#smt_payment_form_donation input[name=amount]').val(parseInt(RadioVal).toFixed(3)); 22 } 23 }); 24 25 26 jQuery("#submit_smt_payment_form_donation").click(function () { 27 var formId = jQuery(this).closest("form").attr("id"); 28 var formData = jQuery(this).closest("form").serialize(); 29 var formValid = true; 30 31 32 jQuery("#" + formId + " :input[required]").each(function () { 33 if (jQuery.trim(jQuery(this).val()) === "") { 34 jQuery(this).addClass("redborder"); 35 formValid = false; 36 } else { 37 jQuery(this).removeClass("redborder"); 38 } 39 }); 40 41 if (formValid) { 42 jQuery.post( 43 ajaxurl, { 44 'action': 'SaveDonation', 45 'data': formData 46 }, 47 function (response) { 48 console.log('response', response); 49 if(response.formUrl) { 50 window.location = response.formUrl; 51 } else { 52 alert("Erreur d'enregistrement, Veuillez Réessayer Plus Tard."); 53 } 54 55 }, "json"); 56 57 58 } else { 59 alert("Veuillez svp remplir les champs obligatoires! Merci."); 60 } 61 62 return false; 63 }); 64 65 66 jQuery("#submit_smt_payment_form_adhesion").click(function () { 67 var formId = jQuery(this).closest("form").attr("id"); 68 var formData = jQuery(this).closest("form").serialize(); 69 var formValid = true; 70 71 72 jQuery("#" + formId + " :input[required]").each(function () { 73 if (jQuery.trim(jQuery(this).val()) === "") { 74 jQuery(this).addClass("redborder"); 75 formValid = false; 76 } else { 77 jQuery(this).removeClass("redborder"); 78 } 79 }); 80 81 if (formValid) { 82 jQuery.post( 83 ajaxurl, { 84 'action': 'SaveAdhesion', 85 'data': formData 86 }, 87 function (response) { 88 console.log('response', response); 89 if(response.formUrl) { 90 window.location = response.formUrl; 91 } else { 92 alert("Erreur d'enregistrement, Veuillez Réessayer Plus Tard."); 93 } 94 }, "json"); 95 } else { 96 alert("Veuillez svp remplir les champs obligatoires! Merci."); 97 } 98 99 return false; 100 }); 101 102});
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.