Loginauth / templates /register.html
Gregniuki's picture
Update templates/register.html
708c3d6
raw
history blame
1.63 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register</title>
<link rel="stylesheet" type="text/css" href="style.css"> <!-- Add this line for your CSS -->
</head>
<body>
<h1>Register</h1>
<form action="/register" method="post" id="registration-form" onsubmit="event.preventDefault(); grecaptcha.execute();">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>
<label for="confirm_password">Confirm Password:</label>
<input type="password" id="confirm_password" name="confirm_password" required><br><br>
<!-- Hidden field for the reCAPTCHA token -->
<input type="hidden" id="recaptcha_token" name="recaptcha_token" value="">
<button type="submit">Register</button>
</form>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<script>
function onSubmit(token) {
document.getElementById('recaptcha_token').value = token;
document.getElementById('registration-form').submit();
}
grecaptcha.ready(function() {
grecaptcha.execute('6LdMjQcpAAAAAGtbNZkL17ry1scsQjp1HSEhkLNl', {action: 'submit'}).then(function(token) {
onSubmit(token);
});
});
</script>
</body>
</html>