Refactoring of Google's reCaptcha inclusion
authorThierry Florac <tflorac@ulthar.net>
Wed, 09 Oct 2019 11:31:08 +0200
changeset 484 8ff990ede299
parent 483 e14fccee0005
child 485 2198718b5329
Refactoring of Google's reCaptcha inclusion
src/pyams_default_theme/shared/form/templates/recaptcha.pt
--- a/src/pyams_default_theme/shared/form/templates/recaptcha.pt	Tue Oct 08 17:19:31 2019 +0200
+++ b/src/pyams_default_theme/shared/form/templates/recaptcha.pt	Wed Oct 09 11:31:08 2019 +0200
@@ -1,8 +1,1 @@
-<script src="https://www.google.com/recaptcha/api.js?render=${context.client_captcha_key}"></script>
-<script>
-	grecaptcha.ready(function() {
-		grecaptcha.execute('${context.client_captcha_key}', {action: 'form_submit'}).then(function(token) {
-			$('input[name="g-recaptcha-response"]').val(token);
-		})
-	});
-</script>
\ No newline at end of file
+<script src="https://www.google.com/recaptcha/api.js?render=${context.client_captcha_key}"></script>
\ No newline at end of file