diff --git a/application/controllers/information.php b/application/controllers/information.php index 7ec3c042..5e4e9819 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -1274,7 +1274,7 @@ class Information extends CI_Controller $addthis_widget = $this->load->view($template_path . '-add-this', false, true); $template = str_replace('', $addthis_widget, $template); } else { - $template = str_replace('', '', $template); + // $template = str_replace('', '', $template); $inquiry_form_template = $this->load->view( $template_path . '-inquiry-form', array('meta_product_code' => $meta_product_code, 'information' => $information), diff --git a/application/views/mobile_first/ah-gp-form.php b/application/views/mobile_first/ah-gp-form.php index e8d936be..79be6ec1 100644 --- a/application/views/mobile_first/ah-gp-form.php +++ b/application/views/mobile_first/ah-gp-form.php @@ -1,3 +1,4 @@ +

Book this trip now. Your 1:1 travel consultant will reply within 1 working day.

@@ -730,7 +731,21 @@ const submitFormBtn = el('submit_gp_form'); submitFormBtn.on('click', () => { if (validateGPForm()) { - el('gp_form').submit(); + + if (typeof(grecaptcha) === "undefined") { + console.warn('grecaptcha is disabled.'); + el('gp_form').submit(); + } else { + grecaptcha.enterprise.ready(async () => { + const token = await grecaptcha.enterprise.execute('6Lf828MhAAAAANNetijCXKwW5ARyhcJ-b1Hhslja', {action: 'ADD_TO_CART'}); + var el = document.createElement("input"); + el.type = "hidden"; + el.name = "__grecaptcha_token__"; + el.value = token; + tailormade_form.appendChild(el); + el('gp_form').submit(); + }); + } } }); diff --git a/application/views/mobile_first/ah-info-page-form.php b/application/views/mobile_first/ah-info-page-form.php index cef577bc..6b3a7d3b 100644 --- a/application/views/mobile_first/ah-info-page-form.php +++ b/application/views/mobile_first/ah-info-page-form.php @@ -1,9 +1,11 @@ + +

Start planning your tailor-made tour now. Your 1:1 travel consultant will reply within 1 working day.

- + - +

For a quick conversation, simply reach us via WhatsApp:

@@ -620,6 +622,29 @@ document.addEventListener('DOMContentLoaded', () => { disableMobile: true, minDate: "today" }); + + var info_page_button = document.getElementById("info_page_button"); + var info_page_form = document.getElementById("info_page_form"); + + info_page_button.addEventListener('click', function(event) { + var validateResult = validateQuickInquiryForm(); + if (validateResult) { + if (typeof(grecaptcha) === "undefined") { + console.warn('grecaptcha is disabled.'); + info_page_form.submit(); + } else { + grecaptcha.enterprise.ready(async () => { + const token = await grecaptcha.enterprise.execute('6Lf828MhAAAAANNetijCXKwW5ARyhcJ-b1Hhslja', {action: 'ADD_TO_CART'}); + var el = document.createElement("input"); + el.type = "hidden"; + el.name = "__grecaptcha_token__"; + el.value = token; + info_page_form.appendChild(el); + info_page_form.submit(); + }); + } + } + }); function validateQuickInquiryForm() { diff --git a/application/views/mobile_first/ah-inquiry-form.php b/application/views/mobile_first/ah-inquiry-form.php index 9bbef304..8529adee 100644 --- a/application/views/mobile_first/ah-inquiry-form.php +++ b/application/views/mobile_first/ah-inquiry-form.php @@ -1,8 +1,7 @@ - - +

Start planning your tailor-made tour now. Your 1:1 travel consultant will reply within 1 working day.

-
+ - +

+8615807734776
Email: contact@asiahighlights.com

-
\ No newline at end of file + + \ No newline at end of file diff --git a/application/views/mobile_first/ah-lantern-form-info-page.php b/application/views/mobile_first/ah-lantern-form-info-page.php index 327f6232..3b8e1ff8 100644 --- a/application/views/mobile_first/ah-lantern-form-info-page.php +++ b/application/views/mobile_first/ah-lantern-form-info-page.php @@ -1,3 +1,4 @@ +

Get Your 2022 Chiang Mai CAD Lantern Mass Release @@ -727,7 +728,20 @@ submit_ticket_button.addEventListener('click', function(event) { var validateResult = validateTicketForm(); if (validateResult) { + if (typeof(grecaptcha) === "undefined") { + console.warn('grecaptcha is disabled.'); ticket_form.submit(); + } else { + grecaptcha.enterprise.ready(async () => { + const token = await grecaptcha.enterprise.execute('6Lf828MhAAAAANNetijCXKwW5ARyhcJ-b1Hhslja', {action: 'ADD_TO_CART'}); + var el = document.createElement("input"); + el.type = "hidden"; + el.name = "__grecaptcha_token__"; + el.value = token; + ticket_form.appendChild(el); + ticket_form.submit(); + }); + } } }); function validateTicketForm() { diff --git a/application/views/mobile_first/ah-lantern-form.php b/application/views/mobile_first/ah-lantern-form.php index 638d481a..608a95c1 100644 --- a/application/views/mobile_first/ah-lantern-form.php +++ b/application/views/mobile_first/ah-lantern-form.php @@ -1,3 +1,4 @@ +

Get Your 2022 Chiang Mai CAD Lantern Mass Release @@ -726,7 +727,20 @@ submit_ticket_button.addEventListener('click', function(event) { var validateResult = validateTicketForm(); if (validateResult) { + if (typeof(grecaptcha) === "undefined") { + console.warn('grecaptcha is disabled.'); ticket_form.submit(); + } else { + grecaptcha.enterprise.ready(async () => { + const token = await grecaptcha.enterprise.execute('6Lf828MhAAAAANNetijCXKwW5ARyhcJ-b1Hhslja', {action: 'ADD_TO_CART'}); + var el = document.createElement("input"); + el.type = "hidden"; + el.name = "__grecaptcha_token__"; + el.value = token; + ticket_form.appendChild(el); + ticket_form.submit(); + }); + } } }); function validateTicketForm() {