Update templates/register.html
Browse files- templates/register.html +21 -6
templates/register.html
CHANGED
@@ -10,17 +10,32 @@
|
|
10 |
<body>
|
11 |
<h1>Register</h1>
|
12 |
<form action="/register" method="post" id="registration-form">
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
<
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
<div class="g-recaptcha" data-sitekey="6LdaUQIpAAAAACQFcOxakEVXK9QHpaYbic6IClNO"></div>
|
19 |
<button type="submit">Register</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
</form>
|
21 |
<script>
|
22 |
function onSubmit(token) {
|
23 |
-
document.getElementById("
|
24 |
document.getElementById("registration-form").submit(); // Submit the form
|
25 |
}
|
26 |
</script>
|
|
|
10 |
<body>
|
11 |
<h1>Register</h1>
|
12 |
<form action="/register" method="post" id="registration-form">
|
13 |
+
<label for="username">Username:</label>
|
14 |
+
<input type="text" id="username" name="username" required><br><br>
|
15 |
+
|
16 |
+
<label for="email">Email:</label>
|
17 |
+
<input type="email" id="email" name="email" required><br><br>
|
18 |
+
|
19 |
+
<label for="password">Password:</label>
|
20 |
+
<input type="password" id="password" name="password" required><br><br>
|
21 |
+
|
22 |
+
<label for="confirm_password">Confirm Password:</label>
|
23 |
+
<input type="password" id="confirm_password" name="confirm_password" required><br><br>
|
24 |
+
|
25 |
+
<!-- Hidden field for the reCAPTCHA token -->
|
26 |
+
<input type="hidden" id="recaptcha_token" name="recaptcha_token" value="">
|
27 |
<div class="g-recaptcha" data-sitekey="6LdaUQIpAAAAACQFcOxakEVXK9QHpaYbic6IClNO"></div>
|
28 |
<button type="submit">Register</button>
|
29 |
+
<button class="g-recaptcha"
|
30 |
+
data-sitekey="6LdaUQIpAAAAACQFcOxakEVXK9QHpaYbic6IClNO"
|
31 |
+
data-callback='onSubmit'
|
32 |
+
data-action='submit'>
|
33 |
+
Register
|
34 |
+
</button>
|
35 |
</form>
|
36 |
<script>
|
37 |
function onSubmit(token) {
|
38 |
+
document.getElementById("recaptcha_token").value = token; // Set the token in the hidden field
|
39 |
document.getElementById("registration-form").submit(); // Submit the form
|
40 |
}
|
41 |
</script>
|