From 49832067745ed334024d28b54ae525108386feb2 Mon Sep 17 00:00:00 2001 From: conncampbell Date: Sat, 26 Jun 2021 12:27:23 -0600 Subject: [PATCH 1/2] fix: missing otp form template html in prior commit. --- frappe/templates/includes/login/login.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/frappe/templates/includes/login/login.js b/frappe/templates/includes/login/login.js index 355e8151f9..3bcd31e93b 100644 --- a/frappe/templates/includes/login/login.js +++ b/frappe/templates/includes/login/login.js @@ -291,11 +291,16 @@ 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(otp_form_template) - ); + $('.login-content:visible').append($('
').attr({ 'id': 'twofactor_div' }).html( + '
\ +
\ + {{ _("Verification") }}\ +
\ +
\ + \ + \ +
')); // add event handler for submit button verify_token(); } From 117a729c8da47a3ca90d73d775f06eb2ccb13671 Mon Sep 17 00:00:00 2001 From: gavin Date: Wed, 30 Jun 2021 10:51:44 +0530 Subject: [PATCH 2/2] refactor(minor): login-content template Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> --- frappe/templates/includes/login/login.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/frappe/templates/includes/login/login.js b/frappe/templates/includes/login/login.js index 3bcd31e93b..4400578862 100644 --- a/frappe/templates/includes/login/login.js +++ b/frappe/templates/includes/login/login.js @@ -292,15 +292,18 @@ var verify_token = function (event) { var request_otp = function (r) { $('.login-content').empty(); - $('.login-content:visible').append($('
').attr({ 'id': 'twofactor_div' }).html( - '
\ -
\ - {{ _("Verification") }}\ -
\ -
\ - \ - \ -
')); + $('.login-content:visible').append( + `
+
+
+ {{ _("Verification") }} +
+
+ + +
+
` + ); // add event handler for submit button verify_token(); }