1jQuery(document).ready(function($) { 2 function fetchAndUpdateBookedSlots() { 3 var clubId = $('#input_236_8').val(); 4 var date = $('#input_236_10').val(); 5 6 $.ajax({ 7 url: ajax_object.ajax_url, 8 type: 'POST', 9 dataType: 'json', 10 data: { 11 action: 'get_booked_slots', 12 nonce: ajax_object.nonce, 13 clubId: clubId, 14 date: date, 15 formId: 236 16 }, 17 success: function(bookedSlots) { 18 $('input[name="input_12"]').each(function() { 19 if (bookedSlots.includes($(this).val())) { 20 $(this).prop('disabled', true); 21 $(this).closest('.gchoice').addClass('disabled hideslot'); 22 } else { 23 $(this).prop('disabled', false); 24 $(this).closest('.gchoice').removeClass('disabled hideslot'); 25 } 26 }); 27 }, 28 error: function(xhr, status, error) { 29 console.error('AJAX Error:', status, error); 30 } 31 }); 32 } 33 34 jQuery(document).bind('gform_post_render', function(){ 35 console.log('updated'); 36 fetchAndUpdateBookedSlots(); 37 }); 38 39 $('#input_236_8, #input_236_10').change(fetchAndUpdateBookedSlots); 40 fetchAndUpdateBookedSlots(); 41});
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.