16 lines
956 B
JavaScript
16 lines
956 B
JavaScript
/**
|
|
* Invisiblerecaptcha Prestashop module
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This file is licenced under the Software License Agreement
|
|
* With the purchase or the installation of the software in your application
|
|
* you accept the licence agreement.
|
|
* You must not modify, adapt or create derivative works of this source code
|
|
*
|
|
* @author Wiktor Koźmiński
|
|
* @copyright 2017-2017 Silver Rose Wiktor Koźmiński
|
|
* @license LICENSE.txt
|
|
*/
|
|
|
|
function onReCaptchaSubmit(t){var e=$("[name=submitMessage]").parents("form");if(e){var a=document.createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name","submitMessage"),a.setAttribute("value","1"),e.get(0).appendChild(a),e.submit()}}$(function(){var t=document.querySelector("[name=submitMessage]");t||(t=$("input[name=submitMessage]").get(0)),t&&GRSITEKEY&&(t.classList.add("g-recaptcha"),t.setAttribute("data-sitekey",GRSITEKEY),t.setAttribute("data-callback","onReCaptchaSubmit"))}); |