From 5a1b028967272b20ae2328ccc0cadf60a2d0a465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Thu, 8 Sep 2022 09:29:04 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0GA4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/mobile_first/gh-pc.php | 6 +++--- application/views/mobile_first/gh.php | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/application/views/mobile_first/gh-pc.php b/application/views/mobile_first/gh-pc.php index ff53ac17..b461c537 100644 --- a/application/views/mobile_first/gh-pc.php +++ b/application/views/mobile_first/gh-pc.php @@ -22,14 +22,14 @@ - - + + diff --git a/application/views/mobile_first/gh.php b/application/views/mobile_first/gh.php index f272e32e..7e30c9fb 100644 --- a/application/views/mobile_first/gh.php +++ b/application/views/mobile_first/gh.php @@ -16,17 +16,16 @@ - - + + - From b49950a364e6532b7d5f1900e87ab23b3f041d5c Mon Sep 17 00:00:00 2001 From: hainatravel Date: Thu, 8 Sep 2022 09:35:00 +0800 Subject: [PATCH 2/7] Update gh-pc.php --- application/views/mobile_first/gh-pc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/views/mobile_first/gh-pc.php b/application/views/mobile_first/gh-pc.php index 5bae7211..ad44db0e 100644 --- a/application/views/mobile_first/gh-pc.php +++ b/application/views/mobile_first/gh-pc.php @@ -22,14 +22,14 @@ - - + + @@ -780,4 +780,4 @@ document.addEventListener('DOMContentLoaded', () => { - \ No newline at end of file + From 577ae3fc39c071f29afa53e44ff9e5a3b92553f2 Mon Sep 17 00:00:00 2001 From: hainatravel Date: Thu, 8 Sep 2022 09:35:24 +0800 Subject: [PATCH 3/7] Update gh.php --- application/views/mobile_first/gh.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/views/mobile_first/gh.php b/application/views/mobile_first/gh.php index 527ecc77..b20d6093 100644 --- a/application/views/mobile_first/gh.php +++ b/application/views/mobile_first/gh.php @@ -16,14 +16,14 @@ - - + + @@ -736,4 +736,4 @@ document.addEventListener('DOMContentLoaded', () => { - \ No newline at end of file + From 78e8bae5d2050fa5588fc8d997f873a5b2bade66 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Fri, 9 Sep 2022 13:38:29 +0800 Subject: [PATCH 4/7] =?UTF-8?q?CH=20=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=B8=ADQI=20=E4=BD=BF=E7=94=A8=20Google=20=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/mobile_first/ch-info-page-form.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/application/views/mobile_first/ch-info-page-form.php b/application/views/mobile_first/ch-info-page-form.php index 97e15bac..db9a23f6 100644 --- a/application/views/mobile_first/ch-info-page-form.php +++ b/application/views/mobile_first/ch-info-page-form.php @@ -5,7 +5,7 @@

Or Submit an Inquiry Below

-
+

*

@@ -15,9 +15,22 @@

*

-
+
+ + + \ No newline at end of file From d0af0ce978b7297470335ba6dc54525ac85ed601 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Fri, 9 Sep 2022 15:59:32 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20QI=20=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E8=A1=A8=E5=8D=95=E4=BD=BF=E7=94=A8=20Google=20?= =?UTF-8?q?=E4=BB=A4=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/information.php | 2 +- application/views/mobile_first/ah-gp-form.php | 17 +++- .../views/mobile_first/ah-info-page-form.php | 29 +++++- .../views/mobile_first/ah-inquiry-form.php | 95 ++++++++++++++++++- .../ah-lantern-form-info-page.php | 14 +++ .../views/mobile_first/ah-lantern-form.php | 14 +++ 6 files changed, 162 insertions(+), 9 deletions(-) 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() { From e601998a0b640e8793bc29ffe38662d84b0bca5b Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Fri, 9 Sep 2022 16:04:39 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20JS=20=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/mobile_first/ah-info-page-form.php | 1 + application/views/mobile_first/ah-inquiry-form.php | 1 + 2 files changed, 2 insertions(+) diff --git a/application/views/mobile_first/ah-info-page-form.php b/application/views/mobile_first/ah-info-page-form.php index 6b3a7d3b..85363a0d 100644 --- a/application/views/mobile_first/ah-info-page-form.php +++ b/application/views/mobile_first/ah-info-page-form.php @@ -644,6 +644,7 @@ document.addEventListener('DOMContentLoaded', () => { }); } } + ); }); diff --git a/application/views/mobile_first/ah-inquiry-form.php b/application/views/mobile_first/ah-inquiry-form.php index 8529adee..fedbab9e 100644 --- a/application/views/mobile_first/ah-inquiry-form.php +++ b/application/views/mobile_first/ah-inquiry-form.php @@ -649,6 +649,7 @@ document.addEventListener('DOMContentLoaded', () => { }); } } + ); }); function validateQuickInquiryForm() {