Add res widget
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 14 Feb 2014 19:46:07 +0000 (19:46 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 14 Feb 2014 19:46:07 +0000 (19:46 +0000)
datepicker defaults second date as first plus 2 days

Toolkit/Page.php
static/427.phtml [new file with mode: 0644]
templates/reservation.html [new file with mode: 0644]
templates/template.html

index 13a10a2..6f7c309 100755 (executable)
@@ -144,9 +144,10 @@ class Toolkit_Page
             : BASE_URL . 'index.php';
 
         // Resources needed for every page.
-        $GLOBALS['styleSheets'] = array();
+        $GLOBALS['styleSheets'] = array(JQUERY_UI_CDN_CSS);
         // Resources needed for every page.
         $GLOBALS['topScripts'][] = JQUERY_CDN_JS;
+        $GLOBALS['topScripts'][] = JQUERY_UI_CDN_JS;
     }
 
     private function _video()
diff --git a/static/427.phtml b/static/427.phtml
new file mode 100644 (file)
index 0000000..df477a6
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+$arrival   = filter_var($_REQUEST['arrival']);
+$departure = filter_var($_REQUEST['departure']);
+?>
+<iframe
+    height="600px"
+    width="100%"
+    scrolling="auto"
+    src="http://reservations.troutcreek.com/irmnet/res/resmain.aspx?Arrival=<?php echo $arrival;?>&Departure=<?php echo $departure;?>"></iframe>
diff --git a/templates/reservation.html b/templates/reservation.html
new file mode 100644 (file)
index 0000000..25e2769
--- /dev/null
@@ -0,0 +1,15 @@
+<form action="{baseURL:h}index.php?catid=427" method="post">
+    <div><input id="resArrival" name="arrival"></div>
+    <div><input id="resDeparture" name="departure"></div>
+    <div><input type="submit" id="resSubmit" name="submit" value="Check Availability"></div>
+</form>
+<script>
+    $(function(){
+        $("#resArrival").datepicker({onSelect: function(dateStr) {
+                var d = $.datepicker.parseDate('mm/dd/yy', dateStr);
+                d.setDate(d.getDate() + 2); // Add two days
+                $('#resDeparture').datepicker('setDate', d);
+        }});
+        $("#resDeparture").datepicker();
+});
+</script>
index 64da82e..6bf5366 100755 (executable)
@@ -7,10 +7,10 @@
 <!--[if lt IE 9]>
 <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
 <![endif]-->
+{styles:h}
 <link rel="shortcut icon" href="/favicon.ico?v=1.1">
 <link rel="stylesheet" href="styles.css"/>
 <link rel="stylesheet" href="fancybox/jquery.fancybox.css"/>
-{styles:h}
 {topScripts:h}
 </head>
 <body id="home">
@@ -39,7 +39,7 @@
                 <!--<img src="baseurl/assets/TMP_slideshow_1.jpg" width="990" height="260">-->
             </div><!--/#slideshow_wrapper-->
             <div id="reservation_wrapper">
-                Reservation Widget Here
+                <flexy:include src="reservation.html">
             </div><!--/#reservation_wrapper-->
             <div id="action_wrapper">
                 <ul id="actionlinks">