Gregniuki commited on
Commit
84afda5
·
1 Parent(s): 616d5ed

Update templates/register.html

Browse files
Files changed (1) hide show
  1. templates/register.html +8 -10
templates/register.html CHANGED
@@ -24,19 +24,17 @@
24
 
25
  <!-- Hidden field for the reCAPTCHA token -->
26
  <input type="hidden" id="recaptcha_token" name="recaptcha_token" value="">
 
 
 
27
 
28
- <button class="g-recaptcha"
29
- data-sitekey="6LdaUQIpAAAAACQFcOxakEVXK9QHpaYbic6IClNO"
30
- data-callback='onSubmit'
31
- data-action='submit'>
32
- Register
33
- </button>
34
  </form>
35
  <script>
36
- function onSubmit(token) {
37
- document.getElementById("recaptcha_token").value = token; // Set the token in the hidden field
38
- document.getElementById("registration-form").submit(); // Submit the form
39
- }
 
40
  </script>
41
  </body>
42
  </html>
 
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
+
30
 
 
 
 
 
 
 
31
  </form>
32
  <script>
33
+ grecaptcha.enterprise.ready(function() {
34
+ grecaptcha.enterprise.execute('6LdaUQIpAAAAACQFcOxakEVXK9QHpaYbic6IClNO', {action: 'submit'}).then(function(token) {
35
+ // Add your logic to submit the token to your server here
36
+ document.getElementById("recaptcha_token").value = token;
37
+ });
38
  </script>
39
  </body>
40
  </html>