testing off canvas datepicker widget issues on develop
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 13 Aug 2018 20:18:02 +0000 (16:18 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 13 Aug 2018 20:18:02 +0000 (16:18 -0400)
functions.php
parts/reservation-form-off-canvas.php

index 2016f2d..130fd88 100644 (file)
@@ -80,6 +80,8 @@ function glm_site_scripts()
         get_template_directory_uri() . '/js/modernizr/modernizr.min.js'
     );
     wp_enqueue_script('jquery');
+    wp_enqueue_script('jquery-ui-datepicker');
+    wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
     wp_enqueue_script(
         'glm_foundation',
         get_template_directory_uri() . '/js/app.js',
@@ -87,8 +89,7 @@ function glm_site_scripts()
         '1.0.2',
         true
     );
-    wp_enqueue_script('jquery-ui-datepicker');
-    wp_enqueue_style('jquery-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');
+    
 
     if(is_front_page()) {
     }
index ed94c3e..4941735 100644 (file)
@@ -1,11 +1,23 @@
+<?php global $post; 
+$oc_properties = array(
+    187 => "Stafford's Bay View Inn",
+    188 => "Stafford's Crooked River Lodge",
+    189 => "Stafford's Perry Hotel"
+); ?>
+<?php $oc_ancestorProperty = setReservationWidgetProperty( $post->ID, $oc_properties ); ?>
 <form method="post">
         <div class="row">
             <div class="small-12 res-search columns">
                 <select id="propertyNameOff" name="s">
-                     <option value="">Property</option>
-                      <option value="vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d">Bay View Inn</option>
-                      <option value="ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d">Crooked River Lodge</option>
-                      <option value="RtXm7mjas4tWRxEAkt8ienQMPRR5EbsZGSOalE8V63s%3d">Perry Hotel</option>
+                    <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>
+                        <?php } else { ?>
+                            <option value="<?php echo $property ;?>"><?php echo $short_name; ?></option>
+                        <?php }  ?>
+                    <?php } ?>
                 </select>
             </div>
              <?php $today = date('Y-m-d'); ?>