File "deactivation-feedback.min.js"
Full Path: /home/rattkxnv/byattorney.com/wp-content/plugins/everest-forms/assets/js/admin/deactivation-feedback.min.js
File size: 1.49 KB
MIME-type: text/plain
Charset: utf-8
jQuery(function(a){({init:function(){this.event_init()},event_init:function(){var t=this;a(document.body).on("click",'tr[data-plugin="everest-forms/everest-forms.php"] span.deactivate a',function(e){e.preventDefault(),a("#evf-deactivate-feedback-popup-wrapper").addClass("active")}),a("#evf-deactivate-feedback-popup-wrapper").click(function(e){a(e.target).closest(".evf-deactivate-feedback-popup-inner").length||a("#evf-deactivate-feedback-popup-wrapper").removeClass("active")}),a("form.evf-deactivate-feedback-form").on("submit",function(e){e.preventDefault(),t.send_data(a(this))}),a("#evf-deactivate-feedback-popup-wrapper").on("click",".close-deactivate-feedback-popup",function(){a("#evf-deactivate-feedback-popup-wrapper").removeClass("active")}),a("input.evf-deactivate-feedback-input").on("click",function(){var e=a(this),t=a('input[name="reason_'+e.val()+'"]');"other"===e.val()||"feature_unavailable"===e.val()||"complex_to_use"===e.val()?t.attr("required","required"):t.removeAttr("required")})},send_data:function(e){var t=e.find('input[name="reason_slug"]:checked').val();t===undefined?alert("Please select at least one option from the list"):e.find("button.submit").hasClass("button-disabled")||(0<(t=e.find('input[name="reason_'+t+'"]')).length&&t.val(),a.ajax({url:evf_plugins_params.ajax_url,data:e.serializeArray(),type:"post",beforeSend:function(){e.find("button.submit").addClass("button-disabled button updating-message")}}).done(function(){window.location=e.find("a.skip").attr("href")}))}}).init()});