diff --git a/application/views/mobile_first/gh-info-page-form.php b/application/views/mobile_first/gh-info-page-form.php index e8118a0f..8656da2c 100644 --- a/application/views/mobile_first/gh-info-page-form.php +++ b/application/views/mobile_first/gh-info-page-form.php @@ -174,8 +174,10 @@

+ placeholder="Your name" required="" type="text"> + + +

+ placeholder="Email" required type="text"> + + +

@@ -467,6 +475,7 @@

+

Having a phone number, especially with WhatsApp/iMessage capability will improve communication efficiency.

@@ -513,7 +522,7 @@ minDate: "today" }); - var quick_inquiry_button = document.getElementById("info_page_button"); + var quick_inquiry_button = document.getElementById("info_page_form_btn"); var quick_inquiry_form = document.getElementById("info_page_form"); quick_inquiry_button.addEventListener('click', function(event) { @@ -550,7 +559,7 @@ var emailErrEl = document.getElementById("email_errmsg"); var emailVerifyErrEl = document.getElementById("email_verify_errmsg"); var startingDateErrEl = document.getElementById("date_error_msg"); - var contactErrEl = document.getElementById("contact_errmsg"); + var contactErrEl = document.getElementById("phone_errmsg"); var groupErrEl = document.getElementById("group_error_msg"); realnameErrEl.style.display = 'none'; @@ -648,7 +657,7 @@ var $expectedDate = $('#starting_date'); var $expectedMonth = $('#expectedMonth'); var $dateSelectionBlock = $('#dateSelectionBlock'); - var $expectedTravelDateBlock = $('#expectedTravelDateBlock'); + var $flatpickrBlock = $('#flatpickrBlock'); $('input[name="trip_date"]').each((i, tripDateEle) => { $(tripDateEle).click(function (e) { $expectedDate.val(''); @@ -658,17 +667,15 @@ selectedExpectedDate = selectedTripDate.id; if (selectedTripDate.id === 'exact') { $dateSelectionBlock.show(); - $expectedTravelDateBlock.hide(); $expectedMonth.hide(); - $expectedDate.show(); + $flatpickrBlock.show(); } else if (selectedTripDate.id === 'approximate') { $dateSelectionBlock.show(); - $expectedTravelDateBlock.hide(); - $expectedDate.hide(); + $flatpickrBlock.hide(); $expectedMonth.show(); } else if (selectedTripDate.id === 'yet') { $dateSelectionBlock.hide(); - $expectedTravelDateBlock.show(); + $flatpickrBlock.hide(); } }) }); @@ -759,37 +766,7 @@ } } }); - document.querySelector('.expandAll').onclick = function (e) { - let obj = document.querySelector('.expandAll'); - let all_status = obj.getAttribute("collapse-status"); - if (all_status == "hide") { - obj.setAttribute("collapse-status", "show"); - obj.querySelector(".expandAllText").innerHTML = "Collapse All"; - obj.parentNode.querySelectorAll("div[collapse] span[id$='Icon']").forEach(function(icon, i){ - icon.classList.remove('OpenIcon'); - icon.classList.add('CloseIcon'); - }); - obj.parentNode.querySelectorAll("div[collapse-content]").forEach(function(itinerary, i){ - slideDown(itinerary); - }); - obj.parentNode.querySelectorAll("div[collapse]").forEach(function(title, i){ - title.setAttribute("collapse-status", "show"); - }); - } else { - obj.setAttribute("collapse-status", "hide"); - obj.querySelector(".expandAllText").innerHTML = "Expand All"; - obj.parentNode.querySelectorAll("div[collapse] span[id$='Icon']").forEach(function(icon, i){ - icon.classList.remove('CloseIcon'); - icon.classList.add('OpenIcon'); - }); - obj.parentNode.querySelectorAll("div[collapse-content]").forEach(function(itinerary, i){ - slideUp(itinerary); - }); - obj.parentNode.querySelectorAll("div[collapse]").forEach(function(title, i){ - title.setAttribute("collapse-status", "hide"); - }); - } - } + function slideUp(target, duration) { duration = duration ? duration : 500; target.style.transitionProperty = 'height, margin, padding';