PluginProbe ʕ •ᴥ•ʔ
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager / 2.1.2
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager v2.1.2
3.1.9 3.1.8 3.1.7 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 trunk 1.3.7 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9 2.9.1 2.9.2
folders / templates / admin / folder-deactivate-form.php
folders / templates / admin Last commit date
admin-content.php 7 years ago folder-deactivate-form.php 7 years ago general-settings.php 7 years ago help.php 7 years ago upgrade-to-pro.php 7 years ago
folder-deactivate-form.php
415 lines
1 <?php
2 defined('ABSPATH') or die('Nope, not accessing this');
3 ?>
4 <style>
5 .folder-hidden {
6 overflow: hidden;
7 }
8
9 .folder-popup-overlay .folder-internal-message {
10 margin: 3px 0 3px 22px;
11 display: none;
12 }
13
14 .folder-reason-input {
15 margin: 3px 0 3px 22px;
16 display: none;
17 }
18
19 .folder-reason-input input[type="text"] {
20 width: 100%;
21 display: block;
22 }
23
24 .folder-popup-overlay {
25 background: rgba(0, 0, 0, .8);
26 position: fixed;
27 top: 0;
28 left: 0;
29 height: 100%;
30 width: 100%;
31 z-index: 1000;
32 overflow: auto;
33 visibility: hidden;
34 opacity: 0;
35 transition: opacity 0.3s ease-in-out :
36 }
37
38 .folder-popup-overlay.folder-active {
39 opacity: 1;
40 visibility: visible;
41 }
42
43 .folder-serveypanel {
44 width: 600px;
45 background: #fff;
46 margin: 65px auto 0;
47 }
48
49 .folder-popup-header {
50 background: #f1f1f1;
51 padding: 20px;
52 border-bottom: 1px solid #ccc;
53 }
54
55 .folder-popup-header h2 {
56 margin: 0;
57 }
58
59 .folder-popup-body {
60 padding: 10px 20px;
61 }
62
63 .folder-popup-footer {
64 background: #f9f3f3;
65 padding: 10px 20px;
66 border-top: 1px solid #ccc;
67 }
68
69 .folder-popup-footer:after {
70 content: "";
71 display: table;
72 clear: both;
73 }
74
75 .action-btns {
76 float: right;
77 }
78
79 .folder-anonymous {
80 display: none;
81 }
82
83 .attention, .error-message {
84 color: red;
85 font-weight: 600;
86 display: none;
87 }
88
89 .folder-spinner {
90 display: none;
91 }
92
93 .folder-spinner img {
94 margin-top: 3px;
95 }
96
97 .folder-hidden-input {
98 padding: 10px 0 0;
99 display: none;
100 }
101
102 .folder-hidden-input input[type='text'] {
103 padding: 0 10px;
104 width: 100%;
105 height: 26px;
106 line-height: 26px;
107 }
108
109 .folder-hidden-input textarea {
110 padding: 10px;
111 width: 100%;
112 }
113
114 span.folder-error-message {
115 color: #dd0000;
116 font-weight: 600;
117 }
118
119 .form-control textarea {
120 width: 100%;
121 height: 100px;
122 margin-bottom: 10px;
123 }
124
125
126 .folder-help-btn {
127 position: fixed;
128 right: 20px;
129 bottom: 20px;
130 z-index: 1001
131 }
132
133 .folder-help-btn a {
134 display: block;
135 border: 3px solid #FFF;
136 width: 50px;
137 height: 50px;
138 -webkit-border-radius: 50%;
139 -moz-border-radius: 50%;
140 border-radius: 50%;
141 position: relative
142 }
143
144 .folder-help-btn a img {
145 width: 100%;
146 height: auto;
147 display: block;
148 -webkit-border-radius: 50%;
149 -moz-border-radius: 50%;
150 border-radius: 50%
151 }
152
153 .folder-help-form {
154 position: fixed;
155 right: 85px;
156 border: 1px solid #e9edf0;
157 bottom: 25px;
158 background: #fff;
159 -webkit-border-radius: 10px;
160 -moz-border-radius: 10px;
161 border-radius: 10px;
162 width: 320px;
163 z-index: 1001;
164 direction: ltr;
165 opacity: 0;
166 transition: .4s;
167 -webkit-transition: .4s;
168 -moz-transition: .4s
169 }
170
171 .folder-help-form.active {
172 opacity: 1;
173 pointer-events: inherit
174 }
175
176 .folder-help-header {
177 background: #f4f4f4;
178 border-bottom: solid 1px #e9edf0;
179 padding: 5px 20px;
180 -webkit-border-radius: 10px;
181 -moz-border-radius: 10px;
182 border-radius: 10px 10px 0 0;
183 font-size: 16px;
184 text-align: right
185 }
186
187 .folder-help-header b {
188 float: left
189 }
190
191 .folder-help-content {
192 margin-bottom: 10px;
193 padding: 20px 20px 10px
194 }
195
196 .folder-help-form p {
197 margin: 0 0 1em
198 }
199
200 .folder-form-field {
201 margin-bottom: 10px
202 }
203
204 .folder-form-field input, .folder-form-field textarea {
205 -webkit-border-radius: 5px;
206 -moz-border-radius: 5px;
207 border-radius: 5px;
208 padding: 5px;
209 width: 100%;
210 box-sizing: border-box;
211 border: 1px solid #c5c5c5
212 }
213
214 .folder-form-field textarea {
215 height: 70px
216 }
217
218 .folder-help-button {
219 border: none;
220 padding: 8px 0;
221 width: 100%;
222 background: #ff6624;
223 color: #fff;
224 border-radius: 18px
225 }
226
227 .folder-help-form .error-message {
228 font-weight: 400;
229 font-size: 14px;
230 display: block;
231 }
232
233 .folder-help-form input.input-error, .folder-help-form textarea.input-error {
234 border-color: #dc3232
235 }
236
237 .folder-help-btn span.tooltiptext {
238 position: absolute;
239 background: #000;
240 font-size: 12px;
241 color: #fff;
242 top: -35px;
243 width: 140%;
244 text-align: center;
245 left: -20%;
246 border-radius: 5px;
247 direction: ltr
248 }
249
250 p.error-p, p.success-p {
251 margin: 0;
252 font-size: 14px;
253 text-align: center
254 }
255
256 .folder-help-btn span.tooltiptext:after {
257 bottom: -20px;
258 content: "";
259 transform: translateX(-50%);
260 height: 10px;
261 width: 0px;
262 border-width: 10px 5px 0;
263 border-style: solid;
264 border-color: #000 transparent transparent;
265 left: 50%;
266 position: absolute
267 }
268 .folder-help-btn {
269 display: none;
270 }
271
272 p.success-p {
273 color: green
274 }
275
276 p.error-p {
277 color: #dc3232
278 }
279
280 html[dir=rtl] .folder-help-btn {
281 left: 20px;
282 right: auto
283 }
284
285 html[dir=rtl] .folder-help-form {
286 left: 85px;
287 right: auto
288 }
289 .folder-popup-body h3 {
290 line-height: 24px;
291 }
292 </style>
293
294 <div class="folder-popup-overlay">
295 <div class="folder-serveypanel">
296 <form action="#" method="post" id="folder-deactivate-form">
297 <div class="folder-popup-header">
298 <h2><?php _e('Quick feedback about Folders', WCP_FOLDER); ?> 🙏</h2>
299 </div>
300 <div class="folder-popup-body">
301 <h3><?php _e('Your feedback will help us improve the product, please tell us why did you decide to deactivate Folders :)', WCP_FOLDER); ?></h3>
302 <div class="form-control">
303 <label></label>
304 <textarea placeholder="<?php echo _e("Your comment", WCP_FOLDER) ?>" id="folder-comment"></textarea>
305 </div>
306 <?php _e("Having any problem with the Folders plugins? <a class='folder-deactivate-button' href='javascript:;'>Click here</a> to contact our support now", WCP_FOLDER) ?>
307 </div>
308 <div class="folder-popup-footer">
309 <label class="folder-anonymous"><input type="checkbox"/><?php _e('Anonymous feedback', WCP_FOLDER); ?>
310 </label>
311 <input type="button" class="button button-secondary button-skip folder-popup-skip-feedback"
312 value="Skip &amp; Deactivate">
313
314 <div class="action-btns">
315 <span class="folder-spinner"><img src="<?php echo admin_url('/images/spinner.gif'); ?>"
316 alt=""></span>
317 <input type="submit" class="button button-secondary button-deactivate folder-popup-allow-deactivate"
318 value="Submit &amp; Deactivate" disabled="disabled">
319 <a href="#"
320 class="button button-primary folder-popup-button-close"><?php _e('Cancel', WCP_FOLDER); ?></a>
321
322 </div>
323 </div>
324 </form>
325 </div>
326 </div>
327
328
329 <script>
330 (function ($) {
331
332 $(function () {
333
334 $(document).on("click", ".folder-deactivate-button", function(e){
335 e.stopPropagation();
336 jQuery(".folder-popup-button-close").trigger("click");
337 jQuery(".folder-help-btn").toggle();
338 jQuery(".folder-help-form").toggleClass("active");
339 jQuery("#user_email").focus();
340 });
341
342 var folderPluginSlug = 'folders';
343 // Code to fire when the DOM is ready.
344
345 $(document).on('click', 'tr[data-slug="' + folderPluginSlug + '"] .deactivate', function (e) {
346 e.preventDefault();
347
348 $('.folder-popup-overlay').addClass('folder-active');
349 $('body').addClass('folder-hidden');
350 });
351 $(document).on('click', '.folder-popup-button-close', function () {
352 close_popup();
353 });
354 $(document).on('click', ".folder-serveypanel,tr[data-slug='" + folderPluginSlug + "'] .deactivate", function (e) {
355 e.stopPropagation();
356 });
357
358 $(document).click(function () {
359 close_popup();
360 });
361 $(document).on("keyup", "#folder-comment", function(){
362 if($.trim($(this).val()) == "") {
363 $(".folder-popup-allow-deactivate").attr("disabled", true);
364 } else {
365 $(".folder-popup-allow-deactivate").attr("disabled", false);
366 }
367 });
368 $(document).on('submit', '#folder-deactivate-form', function (event) {
369 event.preventDefault();
370
371 var _reason = jQuery('#folder-comment').val();
372
373 $.ajax({
374 url: ajaxurl,
375 type: 'POST',
376 data: {
377 action: 'folder_plugin_deactivate',
378 reason: _reason,
379 nonce: '<?php echo wp_create_nonce('wcp_folder_deactivate_nonce') ?>'
380 },
381 beforeSend: function () {
382 $(".folder-spinner").show();
383 $(".folder-popup-allow-deactivate").attr("disabled", "disabled");
384 }
385 }).done(function (res) {
386 console.log(res);
387 res = jQuery.parseJSON(res);
388 if(res.valid == "0") {
389 alert(res.message);
390 window.location.reload(true);
391 } else {
392 $(".folder-spinner").hide();
393 $(".folder-popup-allow-deactivate").removeAttr("disabled");
394 window.location.href = $("tr[data-slug='" + folderPluginSlug + "'] .deactivate a").attr('href');
395 }
396 });
397 });
398
399 $('.folder-popup-skip-feedback').on('click', function (e) {
400 window.location.href = $("tr[data-slug='" + folderPluginSlug + "'] .deactivate a").attr('href');
401 })
402
403 function close_popup() {
404 $('.folder-popup-overlay').removeClass('folder-active');
405 $('#folder-deactivate-form').trigger("reset");
406 $(".folder-popup-allow-deactivate").attr('disabled', 'disabled');
407 $(".folder-reason-input").hide();
408 $('body').removeClass('folder-hidden');
409 $('.message.error-message').hide();
410 }
411 });
412
413 })(jQuery); // This invokes the function above and allows us to use '$' in place of 'jQuery' in our code.
414 </script>
415 <?php include_once dirname(__FILE__)."/help.php" ?>