HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Apache24/htdocs/wp-content/plugins/wpforms-lite/assets/js/components/admin/pages/smtp.min.js
"use strict";var WPFormsPagesSMTP=window.WPFormsPagesSMTP||function(l,i){var o={},p={init:function(){i(p.ready)},ready:function(){p.initVars(),p.events()},initVars:function(){o={$stepInstall:i("section.step-install"),$stepInstallNum:i("section.step-install .num img"),$stepSetup:i("section.step-setup"),$stepSetupNum:i("section.step-setup .num img")}},events:function(){o.$stepInstall.on("click","button",p.stepInstallClick),o.$stepSetup.on("click","button",p.gotoURL)},stepInstallClick:function(){var s=i(this),n=s.attr("data-action"),t=s.attr("data-plugin"),a="";if(!s.hasClass("disabled")){switch(n){case"activate":a="wpforms_activate_addon",s.text(wpforms_pluginlanding.activating);break;case"install":a="wpforms_install_addon",s.text(wpforms_pluginlanding.installing);break;case"goto-url":return void(l.location.href=s.attr("data-url"));default:return}s.addClass("disabled"),p.showSpinner(o.$stepInstallNum);var e={action:a,nonce:wpforms_admin.nonce,plugin:t,type:"plugin"};i.post(wpforms_admin.ajax_url,e).done(function(t){p.stepInstallDone(t,s,n)}).always(function(){p.hideSpinner(o.$stepInstallNum)})}},stepInstallDone:function(t,s,n){if("install"===n?t.success&&t.data.is_activated:t.success)o.$stepInstallNum.attr("src",o.$stepInstallNum.attr("src").replace("step-1.","step-complete.")),s.addClass("grey").text(wpforms_pluginlanding.activated),p.stepInstallPluginStatus();else{var a="install"===n&&t.success&&!t.data.is_activated||"activate"===n,e=a?wpforms_pluginlanding.manual_activate_url:wpforms_pluginlanding.manual_install_url,l=a?wpforms_pluginlanding.error_could_not_activate:wpforms_pluginlanding.error_could_not_install,i=a?wpforms_pluginlanding.plugins_page:wpforms_pluginlanding.download_now;s.removeClass("grey disabled").text(i).attr("data-action","goto-url").attr("data-url",e),s.after('<p class="error">'+l+"</p>")}},stepInstallPluginStatus:function(){var t={action:"wpforms_smtp_page_check_plugin_status",nonce:wpforms_admin.nonce};i.post(wpforms_admin.ajax_url,t).done(p.stepInstallPluginStatusDone)},stepInstallPluginStatusDone:function(t){t.success&&(o.$stepSetup.removeClass("grey"),o.$stepSetupBtn=o.$stepSetup.find("button"),o.$stepSetupBtn.removeClass("grey disabled"),0<t.data.setup_status&&(o.$stepSetupNum.attr("src",o.$stepSetupNum.attr("src").replace("step-2.svg","step-complete.svg")),o.$stepSetupBtn.text(wpforms_pluginlanding.smtp_settings_button)))},gotoURL:function(){var t=i(this);t.hasClass("disabled")||(l.location.href=t.attr("data-url"))},showSpinner:function(t){t.siblings(".loader").removeClass("hidden")},hideSpinner:function(t){t.siblings(".loader").addClass("hidden")}};return p}((document,window),jQuery);WPFormsPagesSMTP.init();