summaryrefslogtreecommitdiff
path: root/modules/timetrack
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2022-02-06 13:36:16 +0100
committertomsmeding <tom.smeding@gmail.com>2022-02-06 13:36:16 +0100
commit970047408dec29fa40df64e36f54bc4ecff4f255 (patch)
tree13b169f8b809e976363a109bbd760b7962618937 /modules/timetrack
parent78b18f8ae5304e90c7d8b625578c2f36455482d8 (diff)
todo/timetrack: Fix unknownuser checks
Diffstat (limited to 'modules/timetrack')
-rw-r--r--modules/timetrack/unknownuser.html10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/timetrack/unknownuser.html b/modules/timetrack/unknownuser.html
index 8911520..65b6ef3 100644
--- a/modules/timetrack/unknownuser.html
+++ b/modules/timetrack/unknownuser.html
@@ -47,13 +47,11 @@ function logoutReload(){
function doCreateUser(){
var username=document.getElementById("username").value;
var password=document.getElementById("password").value;
- var fail;
+ var fail=false;
[["Username",username],["Password",password]].forEach(function(name,value){
- fail=true;
- if(value.length<3)alert(name+" too short!");
- else if(value.length>32)alert(name+" too long!");
- else if(!asciiValid(value))alert("Invalid "+name.toLowerCase()+"! Please use only ASCII characters.");
- else fail=false;
+ if(value.length<3){fail=true;alert(name+" too short!");}
+ else if(value.length>32){fail=true;alert(name+" too long!");}
+ else if(!asciiValid(value)){fail=true;alert("Invalid "+name.toLowerCase()+"! Please use only ASCII characters.");}
});
if(fail)return;