PluginProbe ʕ •ᴥ•ʔ
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager / 2.3.1
Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager v2.3.1
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 6 years ago folder-deactivate-form.php 6 years ago general-settings.php 6 years ago help.php 6 years ago update.php 6 years ago upgrade-to-pro.php 6 years ago
folder-deactivate-form.php
426 lines
1 <?php
2 defined('ABSPATH') or wp_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 height: 100px;
113 margin: 0 0 10px 0;
114 }
115
116 span.folder-error-message {
117 color: #dd0000;
118 font-weight: 600;
119 }
120
121 .form-control textarea {
122 width: 100%;
123 height: 100px;
124 margin-bottom: 10px;
125 }
126
127
128 .folder-help-btn {
129 position: fixed;
130 right: 20px;
131 bottom: 20px;
132 z-index: 1001
133 }
134
135 .folder-help-btn a {
136 display: block;
137 border: 3px solid #FFF;
138 width: 50px;
139 height: 50px;
140 -webkit-border-radius: 50%;
141 -moz-border-radius: 50%;
142 border-radius: 50%;
143 position: relative
144 }
145
146 .folder-help-btn a img {
147 width: 100%;
148 height: auto;
149 display: block;
150 -webkit-border-radius: 50%;
151 -moz-border-radius: 50%;
152 border-radius: 50%
153 }
154
155 .folder-help-form {
156 position: fixed;
157 right: 85px;
158 border: 1px solid #e9edf0;
159 bottom: 25px;
160 background: #fff;
161 -webkit-border-radius: 10px;
162 -moz-border-radius: 10px;
163 border-radius: 10px;
164 width: 320px;
165 z-index: 1001;
166 direction: ltr;
167 opacity: 0;
168 transition: .4s;
169 -webkit-transition: .4s;
170 -moz-transition: .4s
171 }
172
173 .folder-help-form.active {
174 opacity: 1;
175 pointer-events: inherit
176 }
177
178 .folder-help-header {
179 background: #f4f4f4;
180 border-bottom: solid 1px #e9edf0;
181 padding: 5px 20px;
182 -webkit-border-radius: 10px;
183 -moz-border-radius: 10px;
184 border-radius: 10px 10px 0 0;
185 font-size: 16px;
186 text-align: right
187 }
188
189 .folder-help-header b {
190 float: left
191 }
192
193 .folder-help-content {
194 margin-bottom: 10px;
195 padding: 20px 20px 10px
196 }
197
198 .folder-help-form p {
199 margin: 0 0 1em
200 }
201
202 .folder-form-field {
203 margin-bottom: 10px
204 }
205
206 .folder-form-field input, .folder-form-field textarea {
207 -webkit-border-radius: 5px;
208 -moz-border-radius: 5px;
209 border-radius: 5px;
210 padding: 5px;
211 width: 100%;
212 box-sizing: border-box;
213 border: 1px solid #c5c5c5
214 }
215
216 .folder-form-field textarea {
217 width: 100%;
218 height: 100px;
219 margin-bottom: 10px;
220 }
221
222 .folder-help-button {
223 border: none;
224 padding: 8px 0;
225 width: 100%;
226 background: #ff6624;
227 color: #fff;
228 border-radius: 18px
229 }
230
231 .folder-help-form .error-message {
232 font-weight: 400;
233 font-size: 14px;
234 display: block;
235 }
236
237 .folder-help-form input.input-error, .folder-help-form textarea.input-error {
238 border-color: #dc3232
239 }
240
241 .folder-help-btn span.tooltiptext {
242 position: absolute;
243 background: #000;
244 font-size: 12px;
245 color: #fff;
246 top: -35px;
247 width: 140%;
248 text-align: center;
249 left: -20%;
250 border-radius: 5px;
251 direction: ltr
252 }
253
254 p.error-p, p.success-p {
255 margin: 0;
256 font-size: 14px;
257 text-align: center
258 }
259
260 .folder-help-btn span.tooltiptext:after {
261 bottom: -20px;
262 content: "";
263 transform: translateX(-50%);
264 height: 10px;
265 width: 0px;
266 border-width: 10px 5px 0;
267 border-style: solid;
268 border-color: #000 transparent transparent;
269 left: 50%;
270 position: absolute
271 }
272 .folder-help-btn {
273 display: none;
274 }
275
276 p.success-p {
277 color: green
278 }
279
280 p.error-p {
281 color: #dc3232
282 }
283
284 html[dir=rtl] .folder-help-btn {
285 left: 20px;
286 right: auto
287 }
288
289 html[dir=rtl] .folder-help-form {
290 left: 85px;
291 right: auto
292 }
293 .folder-popup-body h3 {
294 line-height: 24px;
295 }
296 .folder-popup-overlay .form-control input {
297 width: 100%;
298 margin: 0 0 15px 0;
299 }
300 </style>
301
302 <div class="folder-popup-overlay">
303 <div class="folder-serveypanel">
304 <form action="#" method="post" id="folder-deactivate-form">
305 <div class="folder-popup-header">
306 <h2><?php esc_html_e('Quick feedback about Folders', WCP_FOLDER); ?> 🙏</h2>
307 </div>
308 <div class="folder-popup-body">
309 <h3><?php esc_html_e('Your feedback will help us improve the product, please tell us why did you decide to deactivate Folders :)', WCP_FOLDER); ?></h3>
310 <div class="form-control">
311 <input type="email" value="<?php echo get_option( 'admin_email' ) ?>" placeholder="<?php echo _e("Email address", WCP_FOLDER) ?>" id="folder-deactivate-email_id">
312 </div>
313 <div class="form-control">
314 <label></label>
315 <textarea placeholder="<?php esc_html_e("Your comment", WCP_FOLDER) ?>" id="folder-comment"></textarea>
316 </div>
317 <?php esc_html_e("Having any problem with the Folders plugins?", WCP_FOLDER) ?><a class='folder-deactivate-button' href='javascript:;'><?php esc_html_e("Click here", WCP_FOLDER) ?></a><?php esc_html_e(" to contact our support now", WCP_FOLDER) ?>
318 </div>
319 <div class="folder-popup-footer">
320 <label class="folder-anonymous"><input type="checkbox"/><?php esc_html_e('Anonymous feedback', WCP_FOLDER); ?>
321 </label>
322 <input type="button" class="button button-secondary button-skip folder-popup-skip-feedback"
323 value="Skip &amp; Deactivate">
324
325 <div class="action-btns">
326 <span class="folder-spinner">
327 <img src="<?php echo esc_url(admin_url('/images/spinner.gif')); ?>" alt="">
328 </span>
329 <input type="submit" class="button button-secondary button-deactivate folder-popup-allow-deactivate" value="Submit &amp; Deactivate" disabled="disabled">
330 <a href="#" class="button button-primary folder-popup-button-close"><?php esc_html_e('Cancel', WCP_FOLDER); ?></a>
331 </div>
332 </div>
333 </form>
334 </div>
335 </div>
336
337
338 <script>
339 (function ($) {
340
341 $(function () {
342
343 $(document).on("click", ".folder-deactivate-button", function(e){
344 e.stopPropagation();
345 jQuery(".folder-popup-button-close").trigger("click");
346 jQuery(".folder-help-btn").toggle();
347 jQuery(".folder-help-form").toggleClass("active");
348 jQuery("#user_email").focus();
349 });
350
351 var folderPluginSlug = 'folders';
352 // Code to fire when the DOM is ready.
353
354 $(document).on('click', 'tr[data-slug="' + folderPluginSlug + '"] .deactivate', function (e) {
355 e.preventDefault();
356
357 $('.folder-popup-overlay').addClass('folder-active');
358 $('body').addClass('folder-hidden');
359 });
360 $(document).on('click', '.folder-popup-button-close', function () {
361 close_popup();
362 });
363 $(document).on('click', ".folder-serveypanel,tr[data-slug='" + folderPluginSlug + "'] .deactivate", function (e) {
364 e.stopPropagation();
365 });
366
367 $(document).click(function () {
368 close_popup();
369 });
370 $(document).on("keyup", "#folder-comment", function(){
371 if($.trim($(this).val()) == "") {
372 $(".folder-popup-allow-deactivate").attr("disabled", true);
373 } else {
374 $(".folder-popup-allow-deactivate").attr("disabled", false);
375 }
376 });
377 $(document).on('submit', '#folder-deactivate-form', function (event) {
378 event.preventDefault();
379
380 var _reason = jQuery('#folder-comment').val();
381 var _email_id = jQuery('#folder-deactivate-email_id').val();
382
383 $.ajax({
384 url: ajaxurl,
385 type: 'POST',
386 data: {
387 action: 'folder_plugin_deactivate',
388 reason: _reason,
389 email_id: _email_id,
390 nonce: '<?php echo esc_attr(wp_create_nonce('wcp_folder_deactivate_nonce')) ?>'
391 },
392 beforeSend: function () {
393 $(".folder-spinner").show();
394 $(".folder-popup-allow-deactivate").attr("disabled", "disabled");
395 }
396 }).done(function (res) {
397 console.log(res);
398 res = jQuery.parseJSON(res);
399 if(res.valid == "0") {
400 alert(res.message);
401 window.location.reload(true);
402 } else {
403 $(".folder-spinner").hide();
404 $(".folder-popup-allow-deactivate").removeAttr("disabled");
405 window.location.href = $("tr[data-slug='" + folderPluginSlug + "'] .deactivate a").attr('href');
406 }
407 });
408 });
409
410 $('.folder-popup-skip-feedback').on('click', function (e) {
411 window.location.href = $("tr[data-slug='" + folderPluginSlug + "'] .deactivate a").attr('href');
412 })
413
414 function close_popup() {
415 $('.folder-popup-overlay').removeClass('folder-active');
416 $('#folder-deactivate-form').trigger("reset");
417 $(".folder-popup-allow-deactivate").attr('disabled', 'disabled');
418 $(".folder-reason-input").hide();
419 $('body').removeClass('folder-hidden');
420 $('.message.error-message').hide();
421 }
422 });
423
424 })(jQuery); // This invokes the function above and allows us to use '$' in place of 'jQuery' in our code.
425 </script>
426 <?php include_once dirname(__FILE__)."/help.php" ?>