From 58859d9804c89a016befe0f80f1e047171e24472 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Thu, 24 Jun 2021 12:12:53 +0530 Subject: [PATCH] style: Improve readability for request_otp --- frappe/templates/includes/login/login.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) {