1/** 2 * 2007-2021 ETS-Soft 3 * 4 * NOTICE OF LICENSE 5 * 6 * This file is not open source! Each license that you purchased is only available for 1 wesite only. 7 * If you want to use this file on more websites (or projects), you need to purchase additional licenses. 8 * You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party. 9 * 10 * DISCLAIMER 11 * 12 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 13 * versions in the future. If you wish to customize PrestaShop for your 14 * needs please contact us for extra customization service at an affordable price 15 * 16 * @author ETS-Soft <[email protected]> 17 * @copyright 2007-2021 ETS-Soft 18 * @license Valid for 1 website (or project) for each purchase of license 19 * International Registered Trademark & Property of ETS-Soft 20 */ 21 22$(document).ready(function (){ 23 24 /*if($('#etsWsReCaptcha').length){ 25 $('form.js-ets-ws-create-account-form').submit(function () { 26 if(etsWsCaptchaType == 'v2'){ 27 var response = grecaptcha.getResponse(); 28 if(response){ 29 return true; 30 } 31 else{ 32 $('.form-errors').html('<div class="alert alert-danger">'+etsWsCaptchaRequired+'</div>'); 33 } 34 return false; 35 } 36 }); 37 $('form.js-ets-ws-form-forgotten-password').submit(function () { 38 if(etsWsCaptchaType == 'v2'){ 39 var response = grecaptcha.getResponse(); 40 if(response){ 41 return true; 42 } 43 else{ 44 $('.form-errors').html('<div class="alert alert-danger">'+etsWsCaptchaRequired+'</div>'); 45 } 46 47 return false; 48 } 49 }); 50 }*/ 51 52}); 53 54var etsAcOnLoadRecaptcha = function() { 55 var addCaptchaV2= false; 56 var addCaptchaV3= false; 57 if($('.ets-ac-lead-form-captcha').length){ 58 if(typeof grecaptcha === 'undefined'){ 59 setTimeout(function () { 60 etsAcOnLoadRecaptcha(); 61 }, 500); 62 return false; 63 } 64 } 65 $('.ets-ac-lead-form-captcha').each(function () { 66 if($(this).closest('form').find('input[name="captcha_type"]').length){ 67 var $this = $(this); 68 var id = $(this).attr('id'); 69 var captchaType = $(this).closest('form').find('input[name="captcha_type"]').val(); 70 var siteKey = $(this).closest('form').find('input[name="captcha_site_key"]').val(); 71 72 if(captchaType == 'v2' && !addCaptchaV2){ 73 grecaptcha.render(id, { 74 'sitekey' : siteKey, 75 }); 76 addCaptchaV2 =true; 77 } 78 else if (captchaType == 'v3' && !addCaptchaV3){ 79 80 grecaptcha.ready(function () { 81 grecaptcha.execute(siteKey, {action: 'submit'}).then(function (token) { 82 $this.closest('form').find('input[name="captcha_v3_response"]').val(token); 83 }); 84 }); 85 addCaptchaV3 = true; 86 } 87 } 88 }); 89 90}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.