Comments (3)
Hello,
In order to make it work with your implementation, you need to edit the line : https://github.com/nenes25/eicaptcha/blob/17/eicaptcha.php#L314
and to add
|| $this->context->controller instanceof CmsController
So the specific js will be loaded in cms page too.
Regards,
from eicaptcha.
Hello
Thank you for your answer.
I added to the eicaptcha.php
//Add Content box to contact form page in order to display captcha if ( $this->context->controller instanceof ContactController || $this->context->controller instanceof CmsController && Configuration::get('CAPTCHA_ENABLE_CONTACT') == 1)
On the cms page, the head section has been added
<link rel="stylesheet" href="http://xxx/modules/eicaptcha/views/css/eicaptcha.css" type="text/css" media="all">
It has not been added
<script type="text/javascript"> //Recaptcha CallBack Function var onloadCallback = function() {grecaptcha.render("captcha-box", {"theme" : "light", "sitekey" : "6Ldv3EsUAAAAACjUJxxxxxxxxxxxx"});}; </script><script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit&hl=" async defer></script>
In body section was added only
<div id="captcha-box"></div>
It has not been added
<div id="captcha-box"><div style="width: 304px; height: 78px;"><div><iframe src="https://www.google.com/recaptcha/api2/anchor?k=6Ldv ......
So the recaptcha window did not appear on the cms page.
Regards.
Edit
In eicaptcha.php I added
|| $this->context->controller instanceof CmsController
In this place:
https://github.com/nenes25/eicaptcha/blob/17/eicaptcha.php#L329
if ( $this->context->controller instanceof ContactController || $this->context->controller instanceof AuthController || $this->context->controller instanceof CmsController )
And everything started working
Thank you.
from eicaptcha.
OK great if it works :-)
So i close the issue
Regards,
from eicaptcha.
Related Issues (20)
- customer-form.tpl verified only in '_PS_THEME_DIR_' and not in '_PS_PARENT_THEME_DIR_' too HOT 2
- [enhancement]: New logo? HOT 1
- The module is not registered in hook actionContactFormSubmitCaptcha HOT 1
- [enhancement]: Integrate Cloudflares Turnstile HOT 1
- Error: initContent HOT 3
- Registration check on prestashop 8.x HOT 4
- Hide captcha in identity controller
- [enhancement]: Cover all possibles cases with test cases HOT 1
- V3 probleme ? HOT 3
- Ooops cant install mudule HOT 2
- Can't enable the module HOT 3
- On Ps 8.0.3 in contact V3 "Merci de valider le captcha" HOT 2
- Perfomance issue. Recaptcha.js loads 2 times if enabled for newsletter and account creation.
- problems with the functional verification HOT 2
- Newsletter recaptcha not working HOT 2
- Debug not working HOT 1
- Php syntax error on php < 7.1
- Google reCAPTCHA v2 Fails to Function on Customer Registration Page HOT 2
- "GDPR" checkbox does not appear in the contact page if the Eicaptcha module is activated (and send message button is inactive) HOT 2
- Recaptcha is not accepted by newsletter form
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eicaptcha.