HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/iranga.kauko.lt/wp-content/plugins/woocommerce-bookings.bad/assets/js/booking-form.min.js
jQuery(document).ready(function(a){window.console||(window.console={log:function(o){}});var r=[];a(".wc-bookings-booking-form").on("change","input, select",function(o){var n=a(this).attr("name");if(!a(this).closest("fieldset").find(".picker:eq(0)").data("is_range_picker_enabled")||"wc_bookings_field_duration"===n){var i=a(".wc-bookings-booking-form").index(this);$form=a(this).closest("form");var t=!$form.find("[name='wc_bookings_field_start_date_day']").val()&&!$form.find("#wc_bookings_field_start_date").val();if("wc_bookings_field_resource"===n&&t)wc_bookings_date_picker.refresh_datepicker();else if(!jQuery(o.target).hasClass("addon")||!t){var s=$form.find("input.required_for_calculation"),e=!0;a.each(s,function(o,n){a(n).val()||(e=!1)}),e?($form.find(".wc-bookings-booking-cost").block({message:null,overlayCSS:{background:"#fff",backgroundSize:"16px 16px",opacity:.6}}).show(),r[i]=a.ajax({type:"POST",url:booking_form_params.ajax_url,data:{action:"wc_bookings_calculate_costs",form:$form.serialize()},success:function(o){"{"!==o.charAt(0)&&(console.log(o),o="{"+o.split(/\{(.+)?/)[1]),result=a.parseJSON(o),"ERROR"==result.result?($form.find(".wc-bookings-booking-cost").html(result.html),$form.find(".wc-bookings-booking-cost").unblock(),$form.find(".single_add_to_cart_button").addClass("disabled")):"SUCCESS"==result.result?($form.find(".wc-bookings-booking-cost").html(result.html),$form.find(".wc-bookings-booking-cost").unblock(),$form.find(".single_add_to_cart_button").removeClass("disabled")):($form.find(".wc-bookings-booking-cost").hide(),$form.find(".single_add_to_cart_button").addClass("disabled"),console.log(o)),a(document.body).trigger("wc_booking_form_changed")},error:function(){$form.find(".wc-bookings-booking-cost").hide(),$form.find(".single_add_to_cart_button").addClass("disabled")},dataType:"html"})):$form.find(".wc-bookings-booking-cost").hide()}}}).each(function(){a(this).closest("form").find(".single_add_to_cart_button").addClass("disabled")}),a(".single_add_to_cart_button").on("click",function(o){if(a(this).hasClass("disabled"))return alert(booking_form_params.i18n_choose_options),o.preventDefault(),!1}),a(".wc-bookings-booking-form").parent().on("updated_addons",function(){a(".wc-bookings-booking-form").find("input").first().trigger("change")}),a(".wc-bookings-booking-form, .wc-bookings-booking-form-button").show().removeAttr("disabled")});