PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 3.0.1
Defender Security – Malware Scanner, Login Security & Firewall v3.0.1
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / src / view / two-fa / providers / totp-enabled.php

totp-enabled.php in Defender Security – Malware Scanner, Login Security & Firewall 3.0.1, at src/view/two-fa/providers/totp-enabled.php

38 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <p class="error"></p>
2 <div id="defender-totp"></div>
3 <script type="text/javascript">
4 jQuery(function ($) {
5 // Toggle.
6 $('body').on('click', '#field-totp', function(){
7 var el = $('.reset-totp-keys');
8 if (this.checked) {
9 el.prop('disabled', false);
10 } else {
11 el.prop('disabled', true);
12 }
13 });
14 // Reset settings.
15 $('body').on('click', '.reset-totp-keys', function () {
16 var el = $(this);
17 $.ajax({
18 type: 'POST',
19 url: '<?php echo $url; ?>',
20 data: {},
21 dataType: 'JSON',
22 beforeSend: function () {
23 el.attr('disabled', 'disabled');
24 },
25 success: function (data) {
26 if (data.success == true) {
27 $('#field-totp').prop('checked', false);
28 location.reload();
29 } else {
30 el.removeAttr('disabled');
31 el.closest('.well').find('.error').text(data.data.message).show();
32 }
33 }
34 });
35 })
36 })
37 </script>
38