Skip to content

Instantly share code, notes, and snippets.

@clivewalkden
Last active April 27, 2018 14:32
Show Gist options
  • Save clivewalkden/5864974e663826baa4f68c96a9c340f4 to your computer and use it in GitHub Desktop.
Save clivewalkden/5864974e663826baa4f68c96a9c340f4 to your computer and use it in GitHub Desktop.
Fix for Amasty GoogleInvisible ReCAPTCHA 2.1.4
Index: app/design/frontend/base/default/template/amasty/aminvisiblecaptcha/captcha.phtml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/design/frontend/base/default/template/amasty/aminvisiblecaptcha/captcha.phtml (revision 4a453745274c5b47515d72496ca05465be86f6bc)
+++ app/design/frontend/base/default/template/amasty/aminvisiblecaptcha/captcha.phtml (revision )
@@ -73,7 +73,9 @@
tokenInput.type = 'hidden';
tokenInput.name = 'amasty_invisible_token';
tokenInput.value = '';
- formToProtectOnPage.appendChild(tokenInput);
+ if (formToProtectOnPage.getInputs('hidden', 'amasty_invisible_token').length < 1) {
+ formToProtectOnPage.appendChild(tokenInput);
+ }
formToProtectOnPage.onsubmit = function submitProtectedForm(event) {
currentForm = event.target;
@clivewalkden
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment