Gregniuki commited on
Commit
af04874
·
1 Parent(s): 283d7a2

Update templates/register.html

Browse files
Files changed (1) hide show
  1. 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
- <!-- ... existing form fields ... -->
14
-
15
- <!-- Hidden field for the reCAPTCHA token -->
16
- <input type="hidden" id="token" name="token" value="">
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("token").value = token; // Set the token in the hidden field
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>