|
|
|
@ -4,8 +4,8 @@
|
|
|
|
|
<form id='ticket_form' action="https://www.asiahighlights.com/orders/lantern_save" method="post" >
|
|
|
|
|
|
|
|
|
|
<p style="font-size: 22px;"><strong>Select Date:</strong></p>
|
|
|
|
|
<div class="selectHotl" style="margin-bottom: 20px;" id="ticket_date_november15th">
|
|
|
|
|
<div class="optionLable">
|
|
|
|
|
<div class="selectHotl" style="margin-bottom: 20px;" >
|
|
|
|
|
<div class="optionLable" id="ticket_date_november15th">
|
|
|
|
|
<input type="radio" value="2024-11-15" checked id="november15th" name="ticket_date">
|
|
|
|
|
<label for="november15th">
|
|
|
|
|
November 15th, 2024
|
|
|
|
@ -23,34 +23,34 @@
|
|
|
|
|
<p style="font-size: 22px;"><strong>Select a Ticket Type:</strong></p>
|
|
|
|
|
<div class="selectHotl" style="margin-bottom: 20px;">
|
|
|
|
|
<div class="optionLable" id="ticket_type_premium_khomloy">
|
|
|
|
|
<input type="radio" value="Premium+Transfer+Dinner" checked id="premium_khomloy" data-price="179" name="ticket_type">
|
|
|
|
|
<input type="radio" value="Premium+Transfer+Dinner" checked id="premium_khomloy" data-price="199" name="ticket_type">
|
|
|
|
|
<label for="premium_khomloy" style="font-size:18px;">
|
|
|
|
|
Premium+Transfer+Dinner
|
|
|
|
|
<div class="selectionMemo">
|
|
|
|
|
US$179 (6400THB)
|
|
|
|
|
US$199
|
|
|
|
|
</div>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="optionLable" id="ticket_type_vip_khomloy">
|
|
|
|
|
<input type="radio" value="VIP+Transfer+Dinner" id="vip_khomloy" data-price="169" name="ticket_type">
|
|
|
|
|
<input type="radio" value="VIP+Transfer+Dinner" id="vip_khomloy" data-price="179" name="ticket_type">
|
|
|
|
|
<label for="vip_khomloy" style="font-size:18px;">
|
|
|
|
|
VIP+Transfer+Dinner
|
|
|
|
|
<div class="selectionMemo">
|
|
|
|
|
US$169 (5900THB)
|
|
|
|
|
US$179
|
|
|
|
|
</div>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="optionLable" id="ticket_type_standard_khomloy">
|
|
|
|
|
<input type="radio" disabled value="Standard+Transfer+Dinner" id="standard_khomloy" data-price="129" name="ticket_type">
|
|
|
|
|
<input type="radio" disabled ="Standard+Transfer+Dinner" id="standard_khomloy" data-price="139" name="ticket_type" value="Standard+Transfer+Dinner">
|
|
|
|
|
<label for="standard_khomloy" style="font-size:18px;">
|
|
|
|
|
Standard+Transfer+Dinner
|
|
|
|
|
<div class="selectionMemo">
|
|
|
|
|
Sold out
|
|
|
|
|
US$139
|
|
|
|
|
</div>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="optionLable" id="ticket_type_premium_heritage" style="display: none;">
|
|
|
|
|
<!-- <div class="optionLable" id="ticket_type_premium_heritage" style="display: none;">
|
|
|
|
|
<input type="radio" value="Premium service+Exclusive Hotel Transfer+Dinner" id="premium_heritage" data-price="159" name="ticket_type">
|
|
|
|
|
<label for="premium_heritage" style="font-size:18px;">
|
|
|
|
|
Premium service+<strong>Exclusive Hotel Transfer</strong>+Dinner
|
|
|
|
@ -65,10 +65,10 @@
|
|
|
|
|
<label for="vip_heritage" style="font-size:18px;">
|
|
|
|
|
VIP Service+Shuttle Transfer+Dinner
|
|
|
|
|
<div class="selectionMemo">
|
|
|
|
|
US$109 (3900THB)
|
|
|
|
|
US$109
|
|
|
|
|
</div>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div id="ticket_type_errmsg" style="display: none">
|
|
|
|
@ -410,6 +410,96 @@
|
|
|
|
|
var ticket_date_november15th = document.getElementById("ticket_date_november15th");
|
|
|
|
|
var ticket_date_november16th = document.getElementById("ticket_date_november16th");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
|
function initDefaultSelection() {
|
|
|
|
|
// 初始化时添加默认的余量信息
|
|
|
|
|
addStyledLabel("ticket_type_premium_khomloy", "60 tickets left", "dynamic-label");
|
|
|
|
|
addStyledLabel("ticket_type_vip_khomloy", "135 tickets left", "dynamic-label");
|
|
|
|
|
addStyledLabel("ticket_type_standard_khomloy", "Sold out", "dynamic-label");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 初始化默认显示
|
|
|
|
|
initDefaultSelection();
|
|
|
|
|
|
|
|
|
|
var ticket_date_november15th = document.getElementById("ticket_date_november15th");
|
|
|
|
|
var ticket_date_november16th = document.getElementById("ticket_date_november16th");
|
|
|
|
|
|
|
|
|
|
ticket_date_november15th.addEventListener('click', function () {
|
|
|
|
|
console.log("ticket_date_november15th clicked");
|
|
|
|
|
// 先移除旧的标签
|
|
|
|
|
removeExistingLabels("ticket_type_premium_khomloy", "dynamic-label");
|
|
|
|
|
removeExistingLabels("ticket_type_vip_khomloy", "dynamic-label");
|
|
|
|
|
removeExistingLabels("ticket_type_standard_khomloy", "dynamic-label");
|
|
|
|
|
|
|
|
|
|
// 添加新的余量标签
|
|
|
|
|
addStyledLabel("ticket_type_premium_khomloy", "60 left", "dynamic-label");
|
|
|
|
|
addStyledLabel("ticket_type_vip_khomloy", "135 left", "dynamic-label");
|
|
|
|
|
addStyledLabel("ticket_type_standard_khomloy", "Sold out", "dynamic-label");
|
|
|
|
|
|
|
|
|
|
// 设置standard_khomloy为disabled
|
|
|
|
|
var standardInput = document.getElementById("standard_khomloy");
|
|
|
|
|
if (standardInput) {
|
|
|
|
|
standardInput.disabled = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
ticket_date_november16th.addEventListener('click', function () {
|
|
|
|
|
console.log("ticket_date_november16th clicked");
|
|
|
|
|
// 先移除旧的标签
|
|
|
|
|
removeExistingLabels("ticket_type_premium_khomloy", "dynamic-label");
|
|
|
|
|
removeExistingLabels("ticket_type_vip_khomloy", "dynamic-label");
|
|
|
|
|
removeExistingLabels("ticket_type_standard_khomloy", "dynamic-label");
|
|
|
|
|
|
|
|
|
|
// 添加新的余量标签
|
|
|
|
|
addStyledLabel("ticket_type_premium_khomloy", "240 left", "dynamic-label");
|
|
|
|
|
addStyledLabel("ticket_type_vip_khomloy", "155 left", "dynamic-label");
|
|
|
|
|
addStyledLabel("ticket_type_standard_khomloy", "33 left", "dynamic-label");
|
|
|
|
|
|
|
|
|
|
var standardInput = document.getElementById("standard_khomloy");
|
|
|
|
|
if (standardInput) {
|
|
|
|
|
standardInput.disabled = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 添加新的余量信息标签
|
|
|
|
|
function addStyledLabel(targetId, text, labelClass) {
|
|
|
|
|
var target = document.getElementById(targetId);
|
|
|
|
|
if (target) {
|
|
|
|
|
removeExistingLabels(targetId, labelClass);
|
|
|
|
|
var existingLabel = target.querySelector('label[for]');
|
|
|
|
|
if (existingLabel) {
|
|
|
|
|
var selectionMemo = existingLabel.querySelector('.selectionMemo');
|
|
|
|
|
if (selectionMemo) {
|
|
|
|
|
var newLabel = document.createElement('label');
|
|
|
|
|
newLabel.style.fontSize = '18px';
|
|
|
|
|
newLabel.textContent = text;
|
|
|
|
|
newLabel.classList.add(labelClass);
|
|
|
|
|
selectionMemo.parentNode.insertBefore(newLabel, selectionMemo.nextSibling);
|
|
|
|
|
} else {
|
|
|
|
|
console.error('SelectionMemo element not found within label.');
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.error('Existing label not found within target ID:', targetId);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.error('Element not found for ID:', targetId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 移除旧的余量标签
|
|
|
|
|
function removeExistingLabels(targetId, labelClass) {
|
|
|
|
|
var target = document.getElementById(targetId);
|
|
|
|
|
if (target) {
|
|
|
|
|
var existingLabels = target.querySelectorAll('.' + labelClass);
|
|
|
|
|
existingLabels.forEach(function(label) {
|
|
|
|
|
label.parentNode.removeChild(label);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var venueList = document.querySelectorAll("input[name='Venue']");
|
|
|
|
|
|
|
|
|
|
var totalPriceText = document.getElementById("totalPriceText");
|
|
|
|
@ -570,4 +660,10 @@
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</script>
|
|
|
|
|
<style>
|
|
|
|
|
.dynamic-label { font-size: 16px;
|
|
|
|
|
font-style: italic;
|
|
|
|
|
padding-top: 5px;
|
|
|
|
|
display: block;}
|
|
|
|
|
</style>
|