PluginProbe
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI / 6.0.3
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI v6.0.3
6.0.3 6.0.2 6.0.1 6.0.0 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.7.9.2 5.7.9.1 5.7.8 5.7.9 5.7.6 5.7.7 5.7.5 5.7.4 5.7.3 5.7.2 5.7.1 trunk 5.6.0 5.6.1 All 34 releases
automatorwp / assets / js / automatorwp-import-automation.js

automatorwp-import-automation.js in AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI 6.0.3, at assets/js/automatorwp-import-automation.js

55 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function ( $ ) {
2
3 var request = window.location.search;
4 request = request.replace( '?page=automatorwp_import_automation&', '' );
5
6 $.ajax({
7 url: ajaxurl,
8 method: 'POST',
9 data: {
10 action: 'automatorwp_import_automation_from_url',
11 nonce: automatorwp_import_automation.nonce,
12 request: request,
13 },
14 success: function( response ) {
15
16 $('.automatorwp-import-automation-loader').hide();
17 $('.automatorwp-import-automation-icon-default').hide();
18
19 if( response.success ) {
20
21 $('.automatorwp-import-automation-icon-success').show();
22
23 // Show the success message
24 $('.automatorwp-import-automation-text')
25 .addClass('automatorwp-import-automation-success')
26 .html( response.data.message );
27
28 // Redirect to the new automation
29 if( response.data.redirect_url !== undefined && response.data.redirect_url.length ) {
30 window.location.href = response.data.redirect_url;
31 }
32 } else {
33
34 $('.automatorwp-import-automation-icon-error').show();
35
36 // Show the error message
37 $('.automatorwp-import-automation-text')
38 .addClass('automatorwp-import-automation-error')
39 .html( response.data );
40 }
41 },
42 error: function( response ) {
43
44 $('.automatorwp-import-automation-loader').hide();
45 $('.automatorwp-import-automation-icon-default').hide();
46 $('.automatorwp-import-automation-icon-error').show();
47
48 // Show the error message
49 $('.automatorwp-import-automation-text')
50 .addClass('automatorwp-import-automation-error')
51 .html( response.data );
52 }
53 });
54
55 })( jQuery );