2020-09-17 16:19:05 -04:00
{{ define "register" }}
{{ template "header" .}}
2020-08-20 12:51:02 -04:00
< body >
2020-09-17 17:47:12 -04:00
< div >
2020-08-20 13:08:45 -04:00
< form method = "POST" action = "/register" >
< table >
< tr >
< td > Username:< / td >
< td > < input type = "text" placeholder = "username" name = "username" < / td >
< tr >
< td > Email Address:< / td >
< td > < input type = "mail" placeholder = "Email address" name = "email" > < / td >
< / tr >
< tr >
< td > Password:< / td >
2020-09-17 19:53:02 -04:00
< td > < input type = "password" id = "password" name = "password" pattern = "(?=.*\d)(?=.*[a-z]).{8,}" title = "Must contain at least one number and at least 8 or more characters" required > < / td >
2020-08-20 13:08:45 -04:00
< / tr >
2020-09-17 17:47:12 -04:00
< tr >
< td > Confirm Password:< / td >
2020-09-17 19:53:02 -04:00
< td > < input type = "password" name = "confirm_password" id = "confirm_password" onchange = "check()" / > < / td >
2020-09-17 17:47:12 -04:00
< td > < span id = 'message' > < / span > < / td >
2020-08-20 13:08:45 -04:00
< tr >
< td > Secret:< / td >
< td > < input type = "password" placeholder = "secret" name = "secret" > < / td >
< / tr >
< tr >
< td > < input type = "submit" value = "Submit" > < / td >
< / tr >
< / table >
< / form >
2020-09-17 17:47:12 -04:00
< / div >
< div id = "requirements" >
< h3 > Password must contain the following:< / h3 >
< p id = "letter" class = "invalid" > A < b > lowercase< / b > letter< / p >
< p id = "capital" class = "invalid" > A < b > capital (uppercase)< / b > letter< / p >
< p id = "number" class = "invalid" > A < b > number< / b > < / p >
< p id = "length" class = "invalid" > Minimum < b > 8 characters< / b > < / p >
< / div >
< script >
function check() {
2020-09-17 19:53:02 -04:00
if(document.getElementById('password').value ===
document.getElementById('confirm_password').value) {
2020-09-17 17:47:12 -04:00
document.getElementById('message').innerHTML = "Passwords match";
} else {
document.getElementById('message').innerHTML = "Passwords don't match";
}
}
< / script >
2020-09-17 16:19:05 -04:00
{{ template "footer" .}}
{{ end }}