invitea/static/templates/invite.tmpl

51 lines
1.5 KiB
Cheetah

<html>
<head>
<title>Invitea</title>
<link rel="icon" href="/img/invitea-full.png" type="image/png">
<link rel="stylesheet" href="/css/simple.css">
</head>
<body>
<header>
<h1><a href="/"><img src="/img/invitea.png" alt="invitea logo" width="60"/></a> Invitea</h1>
<p>
Invite Code: <code>{{ .invite.Code }}</code>
</p>
</header>
<main>
<form id="create-form" method="POST">
<p>
<label for="username">Username</label>
<input type="text" id="username" name="username"/>
</p>
<p>
<label for="email">Email</label>
<input type="text" id="email" name="email"/>
</p>
<p>
<label for="password">Password</label>
<input type="password" id="password" name="password"/>
</p>
<p>
<label for="confirm-password">Confirm Password</label>
<input type="password" id="confirm-password" name="confirm-password"/>
</p>
<button id="create" type="button">Create</button>
</form>
</main>
</body>
<script>
document.getElementById("create").addEventListener("click", () => {
const pass1 = document.getElementById("password").value;
const pass2 = document.getElementById("confirm-password").value;
if (pass1 !== pass2) {
alert("Passwords do not match, please re-enter.");
return;
}
document.getElementById("create-form").submit();
});
</script>
</html>