Gregniuki commited on
Commit
0894c99
1 Parent(s): 0ddeb2c

Update templates/register.html

Browse files
Files changed (1) hide show
  1. templates/register.html +7 -3
templates/register.html CHANGED
@@ -5,7 +5,9 @@
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Register</title>
7
  <link rel="stylesheet" type="text/css" href="/static/style.css"> <!-- Add this line for your CSS -->
8
-
 
 
9
  </head>
10
 
11
  <body>
@@ -41,7 +43,7 @@
41
  </div>
42
  <button type="button" id="submit-button">Register</button>
43
  </div>
44
- <script src="https://www.google.com/recaptcha/api.js" async defer></script>
45
  <script>
46
  document.getElementById('submit-button').addEventListener('click', function() {
47
  var username = document.getElementById('username').value;
@@ -56,7 +58,9 @@
56
  alert("Please fill in all required fields.");
57
  }
58
  });
59
-
 
 
60
  function onSubmit(token) {
61
  document.getElementById('recaptcha_token').value = token;
62
  document.getElementById('registration-form').submit();
 
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Register</title>
7
  <link rel="stylesheet" type="text/css" href="/static/style.css"> <!-- Add this line for your CSS -->
8
+ <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
9
+ async defer>
10
+ </script>
11
  </head>
12
 
13
  <body>
 
43
  </div>
44
  <button type="button" id="submit-button">Register</button>
45
  </div>
46
+
47
  <script>
48
  document.getElementById('submit-button').addEventListener('click', function() {
49
  var username = document.getElementById('username').value;
 
58
  alert("Please fill in all required fields.");
59
  }
60
  });
61
+ var onloadCallback = function() {
62
+ alert("grecaptcha is ready!");
63
+ };
64
  function onSubmit(token) {
65
  document.getElementById('recaptcha_token').value = token;
66
  document.getElementById('registration-form').submit();