From: Steve Sutton Date: Wed, 3 Sep 2014 13:23:42 +0000 (-0400) Subject: Update reservation form X-Git-Tag: v1.0^2~24 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=8ec7189c77258638c96837a04f52dadbf6269cb9;p=web%2FStIgnaceBudgetHost.git Update reservation form This update for the reservation form is for the form to function with their reservation system. --- diff --git a/Toolkit/Page.php b/Toolkit/Page.php index 6c6ff72..f8e3a52 100755 --- a/Toolkit/Page.php +++ b/Toolkit/Page.php @@ -151,6 +151,7 @@ class Toolkit_Page $GLOBALS['styleSheets'][] = JQUERY_UI_CDN_CSS; $GLOBALS['styleSheets'][] = $this->mediaBaseURL . 'fancybox/jquery.fancybox.css'; $GLOBALS['bottomScripts'][] = $this->mediaBaseURL . "fancybox/jquery.fancybox.js"; + $GLOBALS['bottomScripts'][] = $this->mediaBaseURL . 'js/reservation.js'; } private function _video() @@ -489,7 +490,7 @@ class Toolkit_Page ) { $this->_video(); } - + // check if define for GLM_SEARCH is set if (defined("GLM_SEARCH") diff --git a/js/reservation.js b/js/reservation.js new file mode 100644 index 0000000..72e2b3a --- /dev/null +++ b/js/reservation.js @@ -0,0 +1,53 @@ +function resValidate(f) { + var fullMonth =['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + var dateValue = new String(f.date.value); + var dateParts = dateValue.split("/"); + //f.arrival_month = fullMonth[parseInt(dateParts[0] - 1)]; + f.arrival_month.value = dateParts[0]; + f.arrival_day.value = dateParts[1]; + f.arrival_year.value = dateParts[2]; + + var d; + var x; + var today; + var enddate; + + if (f.Nites.value == "") { + alert("Please enter the number of nights."); + f.Nites.focus(); + f.Nites.blur(); + f.Nites.select(); + return false; + } + + if (f.Nites.value > 365) { + alert("We do not accept reservations for more than 365 days in the future."); + f.Nites.focus(); + f.Nites.blur(); + f.Nites.select(); + return false; + } + + today = new Date(); + + // parse date here + + + d = new Date(f.arrival_year.value, f.arrival_month.value - 1, f.arrival_day.value, 23, 59, 59); + if (d < today) { + alert("Arrival is before today, please choose another.") + return false; + } + d = new Date(f.arrival_year.value, f.arrival_month.value - 1, f.arrival_day.value, 0, 0, 0); + if (f.AllowToday.value != "True") { + if (d < today) { + alert("Reservations are not allowed for TODAY."); + f.arrival_day.focus(); + f.arrival_day.blur(); + f.arrival_day.select(); + return false; + } + } + enddate = new Date() + 365; +//window.open('Step2.target','scrollbars=0, resizable=0, menubar=0,toolbar=0,location=0,status=0,height=380, width=600');return false; +} \ No newline at end of file diff --git a/styles.css b/styles.css index d01973d..c8baaa3 100644 --- a/styles.css +++ b/styles.css @@ -460,6 +460,12 @@ aside.right-off-canvas-menu ul.off-canvas-list li ul.dropdown.open { font-size: 12px; text-align: center; } +.reservations form .columns input[type="number"] { + width: 50px; + height: 1.5rem; + padding: 0 0.5rem; + margin: 3px auto 5px auto; +} @media only screen and (max-width: 570px) { .reservations form .columns label { width: auto; @@ -475,7 +481,9 @@ aside.right-off-canvas-menu ul.off-canvas-list li ul.dropdown.open { width: 110px; } @media only screen and (max-width: 570px) { - .reservations form .columns input[type="text"], .reservations form .columns select { + .reservations form .columns input[type="text"], + .reservations form .columns select, + .reservations form .columns input[type="number"]{ margin-left: 0; } } @@ -514,9 +522,12 @@ aside.right-off-canvas-menu ul.off-canvas-list li ul.dropdown.open { float: none; } } -.reservations form .check-in, .reservations form .check-out { +.reservations form .check-in { width: 19%; } +.reservations form .check-out { + width: 10%; +} @media only screen and (max-width: 795px) { .reservations form .check-in, .reservations form .check-out { width: 25%; @@ -776,7 +787,7 @@ footer ul.images li img.latterns { box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05); } -.imgBorderMe img { +.imgBorderMe img { margin-bottom: 8px !important; } @@ -1091,3 +1102,6 @@ li:hover .play { #videoGallery li a:hover span.vTitle { color: #3fac46; } +#ui-datepicker-div { + z-index: 999 !important; +} \ No newline at end of file diff --git a/templates/template.html b/templates/template.html index f6ef89b..279ea64 100644 --- a/templates/template.html +++ b/templates/template.html @@ -85,39 +85,62 @@
-
+ + + + + + +

Reservations

- - + +
- - + +
- +
- +