更新桌面端底部表单

hotfix/paypal-note
LiaoYijun 4 years ago
parent 20dd54a006
commit 6f43e0ea92

@ -156,71 +156,76 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<div class="form_content_bg"></div> <div class="form_content_bg"></div>
<div class="form_content"> <div class="form_content">
<div class="formtitle">
<div class="formtitle"> <h2>Why Travel with Global Highlights</h2>
<h2>Why Travel with Global Highlights</h2> <ul>
<ul> <li class="tailormade"><strong>Tailor-made experience:</strong> All of your ideas/needs will be carefully
<li class="tailormade"><strong>Tailor-made experience:</strong> All of your ideas/needs will be carefully considered to create your ideal trip.</li> considered to create your ideal trip.</li>
<li class="worryfree"><strong>Worry-free planning: </strong>Every step of your trip, you will be looked after by your 1:1 travel consultant based in Asia.</li> <li class="worryfree"><strong>Worry-free planning: </strong>Every step of your trip, you will be looked
<li class="norisk"><strong>No-risk booking:</strong> We refund as much as we can and adapt flexibly to unexpected changes.</li> after by your 1:1 travel consultant based in Asia.</li>
</ul> <li class="norisk"><strong>No-risk booking:</strong> We refund as much as we can and adapt flexibly to
</div> unexpected changes.</li>
</ul>
<div class="ghwhyus"> </div>
<div class="ghwhyus">
<form action="/form/save" id="booking_form_inquiry" method="post" name="booking_form_inquiry"> <form action="/form/save" id="booking_form_inquiry" method="post" name="booking_form_inquiry">
<div class="InquiryFormBox"> <div class="InquiryFormBox">
<div class="FieldSet">
<div class="FieldSet"> <p><input class="FullName" data-required="Please enter your fullname" id="realname" name="realname"
<p><input class="FullName" data-required="Please enter your fullname" id="realname" name="realname" placeholder="Full name" required="" type="text" value=""> <span class="hidden" id="realname_errmsg"></span></p> placeholder="Full name" required="" type="text" value=""></p>
<p><input class="EmailAddress" data-required="Please enter your e-mail address"
<p><input class="EmailAddress" data-required="Please enter your e-mail address" data-pattern="Expecting an e-mail address" id="email" name="email" pattern="^[\w\-\.]+@[\w\-\.]+(\.\w+)+$" placeholder="Email" required="" type="text" value=""> <span class="hidden" id="email_errmsg"></span></p> data-pattern="Expecting an e-mail address" id="email" name="email" pattern="^[\w\-\.]+@[\w\-\.]+(\.\w+)+$"
placeholder="Email" required type="text" value=""></p>
<p><input class="InquiryCalendar hasDatepicker" data-min-date="7" id="starting_date" name="starting_date" placeholder="Starting date" required="" type="date" value="" min="2021-11-02"> <span class="hidden" id="starting_date_errmsg"></span></p> <p><input class="InquiryCalendar hasDatepicker" data-min-date="7" id="starting_date" name="starting_date"
<p><input class="Inquiryphone hasDatepicker" name="phone" placeholder="Phone or other ways to contact you" required="" type="text" value=""> </p> placeholder="Starting date" required type="date"></p>
<textarea id="additionalrequirements" name="additionalrequirements" placeholder="How many people, hotel style and changes to make... " style="margin-bottom:20px;"></textarea> <p><input class="Inquiryphone hasDatepicker" name="phone" placeholder="Phone or other ways to contact you"
<input name="nullemail" placeholder="Your alternative email?" type="hidden" value=""> type="text"> </p>
<input name="cli_no" type="hidden" value=""> <textarea id="additionalrequirements" name="additionalrequirements"
<input name="cli_sn" type="hidden" value=""> placeholder="How many people, hotel style and changes to make... " style="margin-bottom:20px;"></textarea>
<input id="url" name="url" type="hidden" value="file:///D:/globalhighlights.com/design/top-nav.html"> <input name="nullemail" placeholder="Your alternative email?" type="hidden" value="">
<input id="sourcetype" name="sourcetype" type="hidden" value="32113"> <input name="cli_no" type="hidden" value="">
<button class="sendButton" id="submit_booking_form_inquiry" name="booking_form_inquiry_list" type="submit"> <input name="cli_sn" type="hidden" value="">
Send My Inquiry <input id="url" name="url" type="hidden">
<input id="sourcetype" name="sourcetype" type="hidden" value="32113">
</button> <button class="sendButton" id="submit_booking_form_inquiry" name="booking_form_inquiry_list" type="submit">
</div> Send My Inquiry
</button>
</div> </div>
</div>
</form> </form>
<script> </div>
(function() { </div>
String.prototype.lpad = function(padString, length) { <script>
var str = this; (function () {
while (str.length < length) String.prototype.lpad = function (padString, length) {
str = padString + str; var str = this;
return str; while (str.length < length)
} str = padString + str;
document.getElementById("url").value = (window.location.href); return str;
const dateOffset = document.getElementById('starting_date').dataset.minDate; }
const today = new Date(); document.getElementById("url").value = (window.location.href);
const startMinDate = new Date(today.setDate(today.getDate() + parseInt(dateOffset))); const dateOffset = document.getElementById('starting_date').dataset.minDate;
const minDateStr = startMinDate.getFullYear() + '-' + (startMinDate.getMonth() + 1).toString().lpad('0', 2) + '-' + startMinDate.getDate().toString().lpad('0', 2); const today = new Date();
document.getElementById('starting_date').setAttribute("min", minDateStr); const startMinDate = new Date(today.setDate(today.getDate() + parseInt(dateOffset)));
const required_fields = document.querySelectorAll(":required"); const minDateStr =
required_fields.forEach(element => { startMinDate.getFullYear() + '-' +
element.addEventListener("input", function(event) { (startMinDate.getMonth() + 1).toString().lpad('0', 2) + '-' +
if (element.validity.valueMissing) { startMinDate.getDate().toString().lpad('0', 2);
element.setCustomValidity(element.dataset.required); document.getElementById('starting_date').setAttribute("min", minDateStr);
} else if (element.validity.patternMismatch) { const required_fields = document.querySelectorAll(":required");
element.setCustomValidity(element.dataset.pattern); required_fields.forEach(element => {
} else { element.addEventListener("input", function(event) {
element.setCustomValidity(""); if (element.validity.valueMissing) {
} element.setCustomValidity(element.dataset.required);
}); } else if (element.validity.patternMismatch) {
}); element.setCustomValidity(element.dataset.pattern);
})(); } else {
</script> element.setCustomValidity("");
</div> }
</div> });
});
})();
</script>
</div> </div>

Loading…
Cancel
Save