sshmon/views/pages/register.ejs

29 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-08-18 08:57:58 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register</title>
</head>
<body>
<%- include("../partials/navbar.ejs", { activeLink: "register", loggedIn: false }) %>
<form action="/registerUser" method="post">
<h2>Register</h2>
<div class="input-field">
<input type="text" name="username" id="username" placeholder="Enter Username">
</div>
<div class="input-field">
<input type="password" name="password" id="password" placeholder="Enter Password">
</div>
<div class="input-field">
<input type="password" name="password2" id="password2" placeholder="Confirm Password">
</div>
<input type="submit" value="Register">
<% if(invalid == "exists") { %><span style="color:red;">Account already exists</span>
<% } else if(invalid == "noinput") { %><span style="color:red;">Type in username and password</span>
<% } else if(invalid == "nomatch") { %><span style="color:red;">Passwords don't match</span>
<% } else if(invalid == "created") { %><span style="color:green;">Account created</span><% } %>
</form>
</body>
</html>