|
|
|
@ -729,12 +729,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const submitFormBtn = el('submit_gp_form');
|
|
|
|
|
const gp_form = el('gp_form');
|
|
|
|
|
submitFormBtn.on('click', () => {
|
|
|
|
|
if (validateGPForm()) {
|
|
|
|
|
|
|
|
|
|
if (typeof(grecaptcha) === "undefined") {
|
|
|
|
|
console.warn('grecaptcha is disabled.');
|
|
|
|
|
el('gp_form').submit();
|
|
|
|
|
gp_form.submit();
|
|
|
|
|
} else {
|
|
|
|
|
grecaptcha.enterprise.ready(async () => {
|
|
|
|
|
const token = await grecaptcha.enterprise.execute('6Lf828MhAAAAANNetijCXKwW5ARyhcJ-b1Hhslja', {action: 'ADD_TO_CART'});
|
|
|
|
@ -742,8 +743,8 @@
|
|
|
|
|
el.type = "hidden";
|
|
|
|
|
el.name = "__grecaptcha_token__";
|
|
|
|
|
el.value = token;
|
|
|
|
|
tailormade_form.appendChild(el);
|
|
|
|
|
el('gp_form').submit();
|
|
|
|
|
gp_form.appendChild(el);
|
|
|
|
|
gp_form.submit();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|