From 9ebd23a5182cc5a63b359ccb57eac0f9b49d4934 Mon Sep 17 00:00:00 2001 From: si458 Date: Tue, 5 Nov 2024 15:41:37 +0000 Subject: [PATCH] restore login screen enter button use #6494 Signed-off-by: si458 --- views/login-mobile.handlebars | 13 +++++++++++-- views/login.handlebars | 12 ++++++++++-- views/login2.handlebars | 15 +++++++++++++-- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/views/login-mobile.handlebars b/views/login-mobile.handlebars index 24f80c62..fc38a02e 100644 --- a/views/login-mobile.handlebars +++ b/views/login-mobile.handlebars @@ -63,11 +63,11 @@ - + - + @@ -572,6 +572,15 @@ } } + function validateLogin(box, e) { + setTimeout(function(){ + setDialogMode(0); + if ((e != null) && (e.keyCode == 13)) { if (box == 1) { Q('password').focus(); } else if (box == 2) { Q('loginButton').click(); } } + if (e != null) { haltEvent(e); } + }, 100); + } + + function validateCreate(box,e) { setDialogMode(0); var ok = false; diff --git a/views/login.handlebars b/views/login.handlebars index edbda542..2e8458f6 100644 --- a/views/login.handlebars +++ b/views/login.handlebars @@ -55,11 +55,11 @@
Username:
Password:
- + - + @@ -660,6 +660,14 @@ } } + function validateLogin(box, e) { + setTimeout(function(){ + setDialogMode(0); + if ((e != null) && (e.keyCode == 13)) { if ((box == 1) && (Q('username').value != '')) { Q('password').focus(); } else if ((box == 2) && (Q('password').value != '')) { Q('loginButton').click(); } } + if (e != null) { haltEvent(e); } + }, 100); + } + function validateCreate(box, e) { setDialogMode(0); var userok = false; diff --git a/views/login2.handlebars b/views/login2.handlebars index 8c6bdc32..a83c1c50 100644 --- a/views/login2.handlebars +++ b/views/login2.handlebars @@ -69,12 +69,12 @@
Username:
Password:
@@ -771,6 +771,17 @@ if (!formSubmitted) { formSubmitted = true; document.getElementById(v).submit(); } } + function validateLogin(box, e) { + setTimeout(function(){ + setDialogMode(0); + if ((e != null) && (e.keyCode == 13)) { + if ((box == 1) && (Q('username').value != '')) { Q('password').focus(); } + else if ((box == 2) && (Q('password').value != '')) { Q('loginButton').click(); } + } + if (e != null) { haltEvent(e); } + }, 100); + } + function validateCreate(box, e) { setDialogMode(0); var userok = false;
- +
- +