1jQuery(document).ready( function($) { 2 3 /*Hide iFrame button*/ 4 5 $( '#btn-donate-iframe' ).hide(); 6 7 $('input[name="rd_amount"]').on('ifClicked', function (event) { 8 console.log(this.value); 9 }); 10 11/*vars*/ 12 13 14var formData = { 15 'donation_id' : $( '#donation_id' ).val(), 16 'cause_id' : $( '#cause_id' ).val(), 17 'donation_for' : $( '#donation_for' ).val(), 18 'donation_currency' : $( '#donation_currency' ).val(), 19 'cause_amount' : $('input[name="rd_amount"]:checked').val(), 20 'full_name' : $( '#full_name' ).val(), 21 'email' : $( '#email' ).val(), 22} 23 24var i = 0; 25 26$( document ).on( 'click', '.btn-donate', function(event) { 27 28 event.preventDefault(); 29 30 31 32 $.ajax({ 33 url : donation_object.ajax_url, 34 type : 'POST', 35 dataType: 'json', 36 data : { 37 action : 'post_to_pesapal', 38 /*data: formData,*/ 39 nextNonce: donation_object.nextNonce, 40 submission: $( '#someid' ).val(), 41 donation_id : $( '#donation_id' ).val(), 42 cause_id : $( '#cause_id' ).val(), 43 donation_for : $( '#donation_for' ).val(), 44 donation_currency : $( '#donation_currency' ).val(), 45 cause_amount : $('input[name="rd_amount"]:checked').val(), 46 full_name : $( '#full_name' ).val(), 47 email : $( '#email' ).val() 48 }, 49 success: function(response) { 50 if ( true === response.success ) { 51 52 53 /*$('form').attr('action','//squad.wpp-scangroup.com/2017/AMREF/inc/pesapal-iframe.php');*/ 54 $('form').attr('action', ajax_params.pesapal_url); 55 // $('form').attr('action','/amref_2017/wp-content/themes/amref/inc/pesapal-iframe.php'); 56 $('div.confirm').html('<p>Thank you ' + $( '#full_name' ).val() +' for your donation of ' + $('input[name="rd_amount"]:checked').val() + '$</p>').css({"color":"#ffffff","font-size":"18px"}); 57 $( '.dd-cols' ).hide();$( '#btn-donate-iframe' ).show(); 58 $( '.amount-wrapper' ).hide(); 59 $( '.fields-wrapper' ).hide(); 60 $( '#btn-donate-iframe' ).show(); 61 $( '.btn-donate' ).hide(); 62 63 /*$( '#donation_id' ).val(); 64 $( '#cause_id' ).val(); 65 $( '#donation_for' ).hide(); 66 $( '#donation_currency' ).hide(); 67 $( '#cause_amount' ).hide(); 68 $( '#full_name' ).hide(); 69 $( '#email' ).hide(); 70 $( 'label' ).hide(); 71 $( '.btn-donate' ).hide(); 72 $( '#btn-donate-iframe' ).show(); 73 $( '#donation_id' ).val(); 74 $( '#cause_id' ).val(); 75 $( '#donation_for' ).val(); 76 $( '#donation_currency' ).val(); 77 $( '#cause_amount' ).val(); 78 $( '#full_name' ).val(); 79 $( '#email' ).val()*/; 80 81 } else { 82 console.log( response.data ); 83 if (response.data === 'Please select an amount to donate') { 84 alert("Please select an amount to donate"); 85 $( '.btn-donate' ).text(response.data).css({"font-size":"13px","text-transform":"capitalize","background":"#d5153b","color":"#ffffff"}); 86 } 87 else if (response.data === 'Please enter your full names') { 88 alert(response.data); 89 $('#full_name').addClass("error"); 90 $('#full_name').attr("placeholder", response.data); 91 $( '.btn-donate' ).text(response.data).css({"font-size":"13px","text-transform":"capitalize","background":"#d5153b","color":"#ffffff"}); 92 } else if (response.data === 'Please enter your email address') { 93 alert(response.data); 94 $('#email').addClass("error"); 95 $('#email').attr("placeholder", response.data); 96 $( '.btn-donate' ).text(response.data).css({"font-size":"13px","text-transform":"capitalize","background":"#d5153b","color":"#ffffff"}); 97 } 98 99 } 100 }, 101 beforeSend:function(){ 102 $( '.btn-donate' ).text('Processing...').css({"background":"#ffffff","color":"#d5153b"}); 103 104 }, 105 }) 106}) 107})
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.