52 lines
1.6 KiB
HTML
52 lines
1.6 KiB
HTML
{{ define "register" }}
|
|
{{ template "header" .}}
|
|
<body>
|
|
<div>
|
|
<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>
|
|
<td><input type="password" id="psw" name="psw" pattern="(?=.*\d)(?=.*[a-z]).{8,}" title="Must contain at least one number and at least 8 or more characters" required></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Confirm Password:</td>
|
|
<td><input type="password" name="confirm_password" id="confirm_psw" onchange="check()"/></td>
|
|
<td><span id='message'></span></td>
|
|
<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>
|
|
</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() {
|
|
if(document.getElementById('psw').value ===
|
|
document.getElementById('confirm_psw').value) {
|
|
document.getElementById('message').innerHTML = "Passwords match";
|
|
} else {
|
|
document.getElementById('message').innerHTML = "Passwords don't match";
|
|
}
|
|
}
|
|
</script>
|
|
{{ template "footer" .}}
|
|
{{ end }}
|