PluginProbe
Two Factor Authentication / 1.2.6
Two Factor Authentication v1.2.6
1.12.2 1.13.0 1.14.10 1.14.11 1.14.14 1.14.15 1.14.16 1.14.17 1.14.23 1.14.24 1.14.26 1.14.27 1.14.3 1.14.4 1.14.5 1.14.7 1.14.8 1.15.5 1.16.0 1.2.10 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 All 98 releases
← All changes | includes/wooextend.js +17 -12 1.2.101.2.6 View file →
@@ -1,28 +1,32 @@
1 1 jQuery(document).ready(function($) {
2 2
3 3 var submit_can_proceed = false;
4 4
5 - // See if WooCommerce or Affiliate WP login form is present
6 - if($('.woocommerce form.login').length > 0) {
5 + // See if WooCommerce login form is present
6 + if($('.woocommerce form.login').size() > 0) {
7 7 var tfa_wc_form = $('.woocommerce form.login').first();
8 8 var tfa_wc_user_field = $('.woocommerce [name=username]').first();
9 9 var tfa_wc_pass_field = $('.woocommerce [name=password]').first();
10 10 var tfa_wc_submit_btn = $('.woocommerce [name=login]').first();
11 - } else if ($('#affwp-login-form').length > 0) {
12 - var tfa_wc_form = $('#affwp-login-form').first();
13 - var tfa_wc_user_field = $('#affwp-login-user-login, #affwp-user-login').first();
14 - var tfa_wc_pass_field = $('#affwp-login-user-pass, #affwp-user-pass').first();
15 - var tfa_wc_submit_btn = $('#affwp-login-form input[type=submit]').first();
16 - }
17 -
18 - if ('undefined' != typeof tfa_wc_form) {
19 -
11 +
12 +// var tfa_wc_otp_btn = document.createElement('button');
13 +// tfa_wc_otp_btn.id = 'tfa_wc_otp-button';
14 +// tfa_wc_otp_btn.className = 'button button-large button-primary';
15 +// tfa_wc_otp_btn.onclick = function(){ return tfaChangeToInput(); };
16 +// tfa_wc_otp_btn.style.styleFloat = 'none';
17 +// tfa_wc_otp_btn.style.cssFloat = 'none';
18 +//
19 +// var tfa_wc_btn_text = document.createTextNode(simbatfa_wc_settings.click_to_enter_otp);
20 +// tfa_wc_otp_btn.appendChild(tfa_wc_btn_text);
21 +// tfa_wc_otp_btn.style.width = '100%';
22 +
20 23 var tfa_wc_p = document.createElement('p');
21 24 tfa_wc_p.id = 'tfa_wc_holder';
22 25 tfa_wc_p.style.display = 'none';
23 26 tfa_wc_p.style.marginBottom = '15px';
24 27
28 +// tfa_wc_p.appendChild(tfa_wc_otp_btn);
25 29 $(tfa_wc_p).insertBefore(tfa_wc_submit_btn);
26 30
27 31 var p = document.getElementById('tfa_wc_holder');
28 32 var lbl = document.createElement('label');
@@ -59,10 +63,11 @@
59 63 alert(simbatfa_wc_settings.enter_username_first);
60 64 return false;
61 65 }
62 66
67 +
63 68 if (simbatfa_wc_settings.hasOwnProperty('spinnerimg')) {
64 - $('label[for="rememberme"], #affwp-login-form input[type=submit]').after('<img class="simbaotp_spinner" src="'+simbatfa_wc_settings.spinnerimg+'" style="margin-left: 4px;height: 20px; position: relative; top: 4px; border:0px; box-shadow:none;">');
69 + $('label[for="rememberme"]').after('<img class="simbaotp_spinner" src="'+simbatfa_wc_settings.spinnerimg+'" style="margin-left: 4px;height: 20px; position: relative; top: 4px; border:0px; box-shadow:none;">');
65 70 }
66 71
67 72 $.ajax({
68 73 url: simbatfa_wc_settings.ajaxurl,