kids,
perry = 'RtXm7mjas4tWRxEAkt8ienQMPRR5EbsZGSOalE8V63s%3d&';
- ///////off canvas date picker logic //////////////////////////////////////////////
- // Set inputs to default values ///////
- $("#propertyNameOff").val("");
- $("#nightsOff").val("");
- $("#adultsOff").val("");
- $("#kidsOff").val("");
+ // ///////off canvas date picker logic //////////////////////////////////////////////
+ // // Set inputs to default values ///////
+ // $("#propertyNameOff").val("");
+ // $("#nightsOff").val("");
+ // $("#adultsOff").val("");
+ // $("#kidsOff").val("");
$(document).on('change', '#arriveOff', function () {
$("#nightsOff").val(Math.ceil(currentDate2 - currentDate) / (1000 * 60 * 60 * 24));
}
if ($("#nightsOff").val() <= 0) {
- $("#departOff").val("Minimum 1 Night");
+ // $("#departOff").val("Minimum 1 Night");
$("#nightsOff").val("");
}
});
- // restrict departure date ///////////////////////////////
+ // // restrict departure date ///////////////////////////////
$(document).on('change', '#departOff', function () {
currentDate2 = $("#departOff").val();
currentDate2 = new Date(currentDate2);
currentDate2.setDate(currentDate2.getDate());
$("#nightsOff").val(Math.ceil(currentDate2 - currentDate) / (1000 * 60 * 60 * 24));
if ($("#nightsOff").val() <= 0) {
- $("#departOff").val("Minimum 1 Night");
+ // $("#departOff").val("Minimum 1 Night");
$("#nightsOff").val("");
}
stay = 'stay_nights=' + $('#nightsOff').val() + '&';
});
- ///// end of canvas datepicker logic ^ //////////////////////////////////////////////
- /// top bar reservation form dropdown logic ////////////////////////////
+ // ///// end of canvas datepicker logic ^ //////////////////////////////////////////////
+ // /// top bar reservation form dropdown logic ////////////////////////////
$("#arrive").datepicker({
minDate: 0,
dateFormat: 'mm/dd/yy',
$("#departCalOff").click(function () {
$("#departOff").datepicker("show");
});
- // form submission logic
- // off canvas resevation form submission ///////////////////////////////////////////
+ // // form submission logic
+ // // off canvas resevation form submission ///////////////////////////////////////////
$('.res-buttonOff').on('click', function () {
+ console.log($('#propertyNameOff option:selected').text())
adults = "adults=" + $("#adultsOff").val() + "&";
kids = "children=" + $("#kidsOff").val();
- if ($('#propertyNameOff option:selected').text() === "Bay View Inn") {
+ if ($('#propertyNameOff option:selected').text() === " Bay View Inn") {
window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + bayView + start + stay + adults + kids);
- } else if ($('#propertyNameOff option:selected').text() === "Crooked River Lodge") {
+ } else if ($('#propertyNameOff option:selected').text() === " Crooked River Lodge") {
window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + crookedRiver + start + stay + adults + kids);
- } else if ($('#propertyNameOff option:selected').text() === "Perry Hotel") {
+ } else if ($('#propertyNameOff option:selected').text() === " Perry Hotel") {
window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + perry + start + stay + adults + kids);
} else if ($('#propertyName option:selected').text() === "Property") {
alert("Please Select a Property");
}
});
- // top bar reservation dropdown button submission //////////////////////////////////////////
+ // // top bar reservation dropdown button submission //////////////////////////////////////////
$('.res-button').on('click', function () {
adults = "adults=" + $("#adults").val() + "&";
kids = "children=" + $("#kids").val();
kids,
perry = 'RtXm7mjas4tWRxEAkt8ienQMPRR5EbsZGSOalE8V63s%3d&';
- ///////off canvas date picker logic //////////////////////////////////////////////
- // Set inputs to default values ///////
- $("#propertyNameOff").val("");
- $("#nightsOff").val("");
- $("#adultsOff").val("");
- $("#kidsOff").val("");
+ // ///////off canvas date picker logic //////////////////////////////////////////////
+ // // Set inputs to default values ///////
+ // $("#propertyNameOff").val("");
+ // $("#nightsOff").val("");
+ // $("#adultsOff").val("");
+ // $("#kidsOff").val("");
$(document).on('change', '#arriveOff', function () {
$("#nightsOff").val(Math.ceil(currentDate2 - currentDate) / (1000 * 60 * 60 * 24));
}
if ($("#nightsOff").val() <= 0) {
- $("#departOff").val("Minimum 1 Night");
+ // $("#departOff").val("Minimum 1 Night");
$("#nightsOff").val("");
}
});
- // restrict departure date ///////////////////////////////
+ // // restrict departure date ///////////////////////////////
$(document).on('change', '#departOff', function () {
currentDate2 = $("#departOff").val();
currentDate2 = new Date(currentDate2);
currentDate2.setDate(currentDate2.getDate());
$("#nightsOff").val(Math.ceil(currentDate2 - currentDate) / (1000 * 60 * 60 * 24));
if ($("#nightsOff").val() <= 0) {
- $("#departOff").val("Minimum 1 Night");
+ // $("#departOff").val("Minimum 1 Night");
$("#nightsOff").val("");
}
stay = 'stay_nights=' + $('#nightsOff').val() + '&';
});
- ///// end of canvas datepicker logic ^ //////////////////////////////////////////////
- /// top bar reservation form dropdown logic ////////////////////////////
+ // ///// end of canvas datepicker logic ^ //////////////////////////////////////////////
+ // /// top bar reservation form dropdown logic ////////////////////////////
$("#arrive").datepicker({
minDate: 0,
dateFormat: 'mm/dd/yy',
$("#departCalOff").click(function () {
$("#departOff").datepicker("show");
});
- // form submission logic
- // off canvas resevation form submission ///////////////////////////////////////////
+ // // form submission logic
+ // // off canvas resevation form submission ///////////////////////////////////////////
$('.res-buttonOff').on('click', function () {
+ console.log($('#propertyNameOff option:selected').text())
adults = "adults=" + $("#adultsOff").val() + "&";
kids = "children=" + $("#kidsOff").val();
- if ($('#propertyNameOff option:selected').text() === "Bay View Inn") {
+ if ($('#propertyNameOff option:selected').text() === " Bay View Inn") {
window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + bayView + start + stay + adults + kids);
- } else if ($('#propertyNameOff option:selected').text() === "Crooked River Lodge") {
+ } else if ($('#propertyNameOff option:selected').text() === " Crooked River Lodge") {
window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + crookedRiver + start + stay + adults + kids);
- } else if ($('#propertyNameOff option:selected').text() === "Perry Hotel") {
+ } else if ($('#propertyNameOff option:selected').text() === " Perry Hotel") {
window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + perry + start + stay + adults + kids);
} else if ($('#propertyName option:selected').text() === "Property") {
alert("Please Select a Property");
}
});
- // top bar reservation dropdown button submission //////////////////////////////////////////
+ // // top bar reservation dropdown button submission //////////////////////////////////////////
$('.res-button').on('click', function () {
adults = "adults=" + $("#adults").val() + "&";
kids = "children=" + $("#kids").val();
-<?php global $post;
+<?php
+global $post;
$oc_properties = array(
187 => "Stafford's Bay View Inn",
188 => "Stafford's Crooked River Lodge",
<div class="row">
<div class="small-12 res-search columns">
<select id="propertyNameOff" name="s">
- <option value="">Property</option>
- <?php foreach($oc_properties as $id=>$property){
- $short_name = str_replace("Stafford's", "", $property);
- if( $oc_ancestorProperty == $property){ ?>
- <option value="<?php echo $property; ?>" selected><?php echo $short_name; ?></option>
+ <option value="" selected disabled>Property</option>
+ <?php foreach($oc_properties as $id=>$oc_property){
+ $short_name = str_replace("Stafford's", "", $oc_property);
+ if( $oc_ancestorProperty == $oc_property){ ?>
+ <option value="<?php echo $oc_property; ?>" selected><?php echo $short_name; ?></option>
<?php } else { ?>
- <option value="<?php echo $property ;?>"><?php echo $short_name; ?></option>
+ <option value="<?php echo $oc_property ;?>"><?php echo $short_name; ?></option>
<?php } ?>
<?php } ?>
</select>