PluginProbe ʕ •ᴥ•ʔ
JetBackup – Backup, Restore & Migrate / 1.2.5
JetBackup – Backup, Restore & Migrate v1.2.5
3.1.22.4 3.1.22.3 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.8.1 1.4.9 1.5.0 1.5.1 1.5.1.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.10 1.6.11 1.6.12 1.6.13 1.6.15 1.6.5.1 1.6.8.8 1.6.9 1.6.9.1 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7.5 2.0.8.7 2.0.9.11 2.0.9.14 2.0.9.15 2.0.9.6 2.0.9.7 2.0.9.9 3.1.10.7 3.1.11.1 3.1.12.3 3.1.13.4 3.1.14.17 3.1.15.4 3.1.16.1 3.1.17.5 3.1.18.10 3.1.18.8 3.1.18.9 3.1.19.8 3.1.20.3 3.1.21.3 3.1.7.9 3.1.9.2 trunk 1.1.90 1.1.91 1.2.0 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2
backup / public / js / deactivationSurvey.js
backup / public / js Last commit date
Chart.bundle.min.js 6 years ago bootstrap-switch.min.js 6 years ago bootstrap.min.js 6 years ago deactivationSurvey.js 6 years ago jquery-ui.js 6 years ago jquery.fileupload.js 6 years ago jquery.iframe-transport.js 6 years ago jquery.rateyo.js 6 years ago jstree.checkbox.js 6 years ago jstree.min.js 6 years ago jstree.types.js 6 years ago jstree.wholerow.js 6 years ago less.min.js 6 years ago main.js 6 years ago popup.js 6 years ago sgNoticeDismiss.js 6 years ago sgbackup.js 6 years ago sgcloud.js 6 years ago sgdiscount.js 6 years ago sglicense.js 6 years ago sglogin.js 6 years ago sgrequesthandler.js 6 years ago sgrequesthandler.wordpress.js 6 years ago sgschedule.js 6 years ago sgsettings.js 6 years ago
deactivationSurvey.js
106 lines
1 var deactivationUrl = "";
2
3 jQuery("tr[data-slug='backupguard-pro'] .deactivate a").click(function() {
4 event.preventDefault();
5 deactivationUrl = jQuery(this).attr("href");
6 jQuery("#bg-deactivation-survey-popup-container").show();
7 });
8
9 jQuery("tr[data-slug='backup'] .deactivate a").click(function() {
10 event.preventDefault();
11 deactivationUrl = jQuery(this).attr("href");
12 jQuery("#bg-deactivation-survey-popup-container").show();
13 });
14
15 jQuery('.bg-deactivation-survey-popup-cancel').click(function(e) {
16 jQuery('.bg-deactivation-survey-popup-container').slideUp();
17 jQuery('.bg-deactivation-survey-popup-overlay').hide();
18 });
19
20 jQuery("#bg-skip-and-deactivate").on("click", function () {
21 event.preventDefault();
22
23 var data = {
24 action: 'backup_guard_storeSurveyResult',
25 skip: 'skip',
26 token: BG_BACKUP_STRINGS.nonce
27 };
28
29 jQuery.post(ajaxurl, data, function(response) {
30 }).always(function() {
31 window.location.replace(deactivationUrl);
32 });
33 });
34
35 jQuery('#bg-deactivation-survey-reason').on('change', function () {
36 if (jQuery(this).val() == "custom") {
37 jQuery('#bg-deactivation-survey-reason-custom').show();
38 }
39 else {
40 jQuery('#bg-deactivation-survey-reason-custom').hide();
41 }
42 });
43
44 jQuery('.bg-deactivation-survey-result-submit').click(function(e) {
45 e.preventDefault();
46
47 var email = jQuery('#bg-deactivation-survey-email').val();
48 var firstname = jQuery.trim(jQuery('#bg-deactivation-survey-first-name').val());
49 var lastname = jQuery.trim(jQuery('#bg-deactivation-survey-last-name').val());
50 var reason = jQuery.trim(jQuery('#bg-deactivation-survey-reason').val());
51
52 var sendData = true;
53 jQuery('.bg-deactivation-survey-popup-error-message').hide();
54
55 if (reason == "custom") {
56 reason = jQuery('#bg-deactivation-survey-reason-custom').val();
57
58 if (!reason) {
59 jQuery('#bg-deactivation-survey-reason-custom-error').show();
60 sendData = false;
61 }
62 }
63 else if (!reason) {
64 jQuery('#bg-deactivation-survey-reason-error').show();
65 sendData = false;
66 }
67
68 if(firstname == '') {
69 jQuery('#bg-deactivation-survey-first-name-error').show();
70 sendData = false;
71 }
72
73 if(lastname == '') {
74 jQuery('#bg-deactivation-survey-last-name-error').show();
75 sendData = false;
76 }
77
78 if (!isValidEmailAddress(email)) {
79 jQuery('#bg-deactivation-survey-email-error').show();
80 sendData = false;
81 }
82
83 if(sendData) {
84 jQuery('.bg-deactivation-survey-popup-container').slideUp();
85 jQuery('.bg-deactivation-survey-popup-overlay').hide();
86
87 var data = {
88 action: 'backup_guard_storeSurveyResult',
89 email: email,
90 firstname: firstname,
91 lastname: lastname,
92 response: reason,
93 token: BG_BACKUP_STRINGS.nonce
94 };
95
96 jQuery.post(ajaxurl, data, function(response) {
97 window.location.replace(deactivationUrl);
98 });
99 }
100 });
101
102 function isValidEmailAddress(emailAddress) {
103 var pattern = new RegExp(/^(("[\w-+\s]+")|([\w-+]+(?:\.[\w-+]+)*)|("[\w-+\s]+")([\w-+]+(?:\.[\w-+]+)*))(@((?:[\w-+]+\.)*\w[\w-+]{0,66})\.([a-z]{2,10}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][\d]\.|1[\d]{2}\.|[\d]{1,2}\.))((25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\.){2}(25[0-5]|2[0-4][\d]|1[\d]{2}|[\d]{1,2})\]?$)/i);
104 return pattern.test(emailAddress);
105 }
106