diff options
author | adam <adam@> | 2021-01-29 03:26:28 +0200 |
---|---|---|
committer | adam <adam@> | 2021-01-29 03:26:28 +0200 |
commit | 472e170f408e3d8d1db2eb066d445153aad55d73 (patch) | |
tree | 7b748d2b87ab018d7ff451b4111a1b88eeb58416 /js | |
parent | 5d3d901d968db7eb3da9c038e6d823f7c75f1e10 (diff) | |
download | fileup-472e170f408e3d8d1db2eb066d445153aad55d73.tar.gz |
register and login looks ok
Diffstat (limited to 'js')
-rw-r--r-- | js/arrows.js | 2 | ||||
-rw-r--r-- | js/validate_hero.js | 25 |
2 files changed, 21 insertions, 6 deletions
diff --git a/js/arrows.js b/js/arrows.js index ec7352c..10ad416 100644 --- a/js/arrows.js +++ b/js/arrows.js @@ -20,7 +20,7 @@ function make_arrow() { setTimeout(make_arrow, delay); setTimeout(() => { svg.remove(); - arrows.remove(ob); + arrows.shift(); }, lifetime); } diff --git a/js/validate_hero.js b/js/validate_hero.js index 118abbf..6d29a53 100644 --- a/js/validate_hero.js +++ b/js/validate_hero.js @@ -8,6 +8,20 @@ function clear_hero_errors() errors[i].hidden = true; } } +function validate_hero_login_form() +{ + var username=document.forms["hero_form"]["username"].value; + var flag=true; + clear_hero_errors(); + + if(username.length==0) + { + document.getElementById("username-length-error").hidden=false; + flag=false; + } + document.activeElement.blur(); + return flag; +} function validate_hero_form() { var username=document.forms["hero_form"]["username"].value; @@ -28,16 +42,17 @@ function validate_hero_form() document.getElementById("email-error").hidden=false; flag=false; } - if(password !== password2) + if(password.length==0) { - document.getElementById("password-error").hidden=false; + document.getElementById("password-length-error").hidden=false; flag=false; } - - if(flag) + if(password !== password2) { - document.getElementById("success").hidden=false; + document.getElementById("password-match-error").hidden=false; + flag=false; } + document.activeElement.blur(); return flag; } |