From e12a6c24f2c0c54eb2c2bc01eda979528125e60a Mon Sep 17 00:00:00 2001 From: conncampbell Date: Sat, 8 May 2021 21:32:18 -0600 Subject: [PATCH] fix: OTP login verification fails --- frappe/templates/includes/login/login.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/frappe/templates/includes/login/login.js b/frappe/templates/includes/login/login.js index 52ac70513d..93bf95bdb7 100644 --- a/frappe/templates/includes/login/login.js +++ b/frappe/templates/includes/login/login.js @@ -291,17 +291,10 @@ var verify_token = function (event) { } var request_otp = function (r) { - $('.login-content').empty().append($('
').attr({ 'id': 'twofactor_div' }).html( - '
\ -
\ - {{ _("Verification") }}\ -
\ -
\ - \ - \ -
')); - // add event handler for submit button - verify_token(); + $('.login-content').empty(); + $('.login-content:visible').append($('
').attr({ 'id': 'twofactor_div' }).html('{{ _("Verification") }}{{ _("Verify") }}')); + // add event handler for submit button + verify_token(); } var continue_otp_app = function (setup, qrcode) {