diff --git a/frappe/templates/includes/login/login.js b/frappe/templates/includes/login/login.js index 93bf95bdb7..355e8151f9 100644 --- a/frappe/templates/includes/login/login.js +++ b/frappe/templates/includes/login/login.js @@ -291,10 +291,13 @@ var verify_token = function (event) { } var request_otp = function (r) { + const otp_form_template = '{{ _("Verification") }}{{ _("Verify") }}'; $('.login-content').empty(); - $('.login-content:visible').append($('
').attr({ 'id': 'twofactor_div' }).html('{{ _("Verification") }}{{ _("Verify") }}')); - // add event handler for submit button - verify_token(); + $('.login-content:visible').append( + $('
').attr({ 'id': 'twofactor_div' }).html(otp_form_template) + ); + // add event handler for submit button + verify_token(); } var continue_otp_app = function (setup, qrcode) {