1+(function($) { 2 3 "use strict"; 4 5 /** 6 * Fire The Popup 7 */ 8 9 $(document).on("click", ".wpb-get-a-quote-button-form-fire", function(e) { 10 11 e.preventDefault(); 12 13 var button = $(this), 14 id = button.attr('data-id'), 15 post_id = button.attr('data-post_id'), 16 form_style = button.attr('data-form_style') ? !0 : !1, 17 allow_outside_click = button.attr('data-allow_outside_click') ? !0 : !1, 18 width = button.attr('data-width'); 19 20 wp.ajax.send( { 21 ajax_option : 'fire_wpb_gqb_contact_form', 22 data: { 23 action: 'fire_contact_form', 24 contact_form_id: id, 25 wpb_post_id: post_id 26 }, 27 beforeSend : function ( xhr ) { 28 button.addClass('wpb-gqf-btn-loading'); 29 }, 30 success: function( res ) { 31 button.removeClass('wpb-gqf-btn-loading'); 32 Swal.fire({ 33 html: res,
34 showConfirmButton: false, 35 customClass: { 36 container: 'wpb-gqf-form-style-' + form_style, 37 }, 38 padding: '30px', 39 width: width, 40 showCloseButton: true, 41 backdrop: true, 42 allowOutsideClick: allow_outside_click, 43 }); 44 45 46 // For CF7 5.3.1 and before 47 if( typeof wpcf7.initForm === "function" ){ 48 wpcf7.initForm( $('.wpcf7-form') ); 49 } 50 51 // For CF7 5.4 and after 52 if( typeof wpcf7.init === "function" ){ 53 document.querySelectorAll(".wpcf7 > form").forEach(function (e) { 54 return wpcf7.init(e); 55 }); 56 } 57 58 // Reinitialize reCAPTCHA v3 59 if (typeof grecaptcha !== "undefined" && wpcf7_recaptcha) { 60 61 grecaptcha.ready(function () { 62 grecaptcha.execute(wpcf7_recaptcha.sitekey, { 63 action: wpcf7_recaptcha.actions.contactform 64 }).then(function (token) { 65 const event = new CustomEvent("wpcf7grecaptchaexecuted", { 66 detail: { action: wpcf7_recaptcha.actions.contactform, token: token } 67 }); 68 document.dispatchEvent(event); 69 70 // Update the hidden input in the dynamically loaded form 71 $('.wpcf7-form').find('input[name="_wpcf7_recaptcha_response"]').val(token); 72 }); 73 }); 74 } 75 76 // Add support for - Simple Cloudflare Turnstile â CAPTCHA Alternative 77 if( typeof turnstile !== "undefined" ){ 78 79 var cf_turnstile_id = $($.parseHTML(res)).find('.cf-turnstile').attr('id'); 80 if (document.getElementById(cf_turnstile_id)) { 81 setTimeout(function() { 82 turnstile.render('#' + cf_turnstile_id); 83 }, 10); 84 } 85 } 86 87 // Add support for - Drag and Drop Multiple File Upload â Contact Form 7 88 if( typeof initDragDrop === "function" ){ 89 window.initDragDrop(); 90 } 91 92 // ReCaptcha v2 for Contact Form 7 - By IQComputing 93 if( typeof recaptchaCallback === "function" ){ 94 recaptchaCallback(); 95 } 96 97 // Add support for - Conditional Fields for Contact Form 7 98 if ( typeof wpcf7cf !== 'undefined' ) { 99 wpcf7cf.initForm( $('.wpcf7-form') ); 100 } 101 102 // Add post ID to the popup form 103 $("[name='_wpcf7_container_post']").val( post_id ); 104 105 // WP Armour â Honeypot Anti Spam By Dnesscarkey. 106 if (typeof wpa_add_honeypot_field == 'function') { 107 wpa_add_honeypot_field(); 108 } 109 110 // WP Armour PRO â Honeypot Anti Spam By Dnesscarkey. 111 if (typeof wpae_add_honeypot_field == 'function') { // IF EXTENDED version exists. 112 wpae_add_honeypot_field(); 113 } 114 115 // Adding any custom JS code on form init 116 if( typeof wpb_gqf_on_cf7_form_init === "function" ){ 117 wpb_gqf_on_cf7_form_init(); 118 } 119 120 }, 121 error: function(error) { 122 alert( error ); 123 } 124 }); 125 126 }); 127 128 129 /** 130 * Hide if variation has no stock 131 */ 132 133 $(document).on( 'found_variation', 'form.variations_form', function( event, variation ) { 134 if( !variation.is_in_stock ){ 135 $('.wpb-gqb-product-type-variable').addClass('wpb-gqb-product-type-variable-show'); 136 }else{ 137 $('.wpb-gqb-product-type-variable').removeClass('wpb-gqb-product-type-variable-show'); 138 } 139 }); 140 141 $(document).on( 'click', '.reset_variations', function( event ) { 142 $('.wpb-gqb-product-type-variable').removeClass('wpb-gqb-product-type-variable-show'); 143 }); 144 145})(jQuery);
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.