1+(function($) { 2 3 $(document).on("click", ".wpb-pcf-form-fire", function(e) { 4 5 e.preventDefault(); 6 7 var button = $(this), 8 id = button.attr('data-id'), 9 post_id = button.attr('data-post_id'), 10 form_style = button.attr('data-form_style') ? !0 : !1, 11 allow_outside_click = button.attr('data-allow_outside_click') ? !0 : !1, 12 width = button.attr('data-width'); 13 14 wp.ajax.send( { 15 data: { 16 action: 'wpb_pcf_fire_contact_form', 17 pcf_form_id: id, 18 wpb_pcf_post_id: post_id, 19 _wpnonce: WPB_PCF_Vars.nonce 20 }, 21 beforeSend : function ( xhr ) { 22 button.addClass('wpb-pcf-btn-loading'); 23 }, 24 success: function( res ) { 25 button.removeClass('wpb-pcf-btn-loading'); 26 27 28 29 Swal.fire({ 30 html: res, 31 showConfirmButton: false, 32 customClass: { 33 container: 'wpb-pcf-form-style-' + form_style, 34 }, 35 padding: '30px', 36 width: width, 37 showCloseButton: true, 38 allowOutsideClick: allow_outside_click, 39 }); 40 41 // For CF7 5.3.1 and before 42 if ( typeof wpcf7.initForm === 'function' ) { 43 wpcf7.initForm( $('.wpcf7-form') ); 44 } 45 46 // For CF7 5.4 and after 47 if ( typeof wpcf7.init === 'function' ) { 48 document.querySelectorAll(".wpcf7 > form").forEach(function (e) { 49 return wpcf7.init(e); 50 }); 51 } 52 53 // Add support for - Drag and Drop Multiple File Upload â Contact Form 7 54 if( typeof initDragDrop === "function" ){ 55 window.initDragDrop(); 56 } 57 58 // ReCaptcha v2 for Contact Form 7 - By IQComputing 59 if( typeof recaptchaCallback === "function" ){ 60 recaptchaCallback(); 61 } 62 63 // Add support for - Conditional Fields for Contact Form 7 64 if ( typeof wpcf7cf !== 'undefined' ) { 65 wpcf7cf.initForm( $('.wpcf7-form') ); 66 } 67 68 // Add post ID to the popup form 69 $("[name='_wpcf7_container_post']").val( post_id ); 70 71 }, 72 error: function(error) { 73 alert( error ); 74 } 75 }); 76 }); 77 78})(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.