Changed reservation off canvas nav link to submit form
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 30 Oct 2015 16:48:20 +0000 (12:48 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 30 Oct 2015 16:48:20 +0000 (12:48 -0400)
header.php
js/app.js
js/custom/pageSetup.js

index 1e5614b..222eb9a 100644 (file)
@@ -51,7 +51,7 @@
                             </div>
                            <!-- <script type="text/javascript" src="//weblink.instantsoftware.com/scripts/widget?coid=1134&amp;header=Check Availability&amp;guests=true&amp;beds=false&amp;baths=false&amp;"></script> -->
                             <div class="large-10 columns">
-                                <form id = "form" method="post" action="<?php echo get_permalink(150); ?>">
+                                <form name="form" id = "form" method="post" action="<?php echo get_permalink(150); ?>">
                                     <div class="row collapse">
                                         <div class="large-4 res-search columns">
                                             <input id="propsearch" type="text" placeholder="Search by property" name="s">
index 1cb1d34..ad3f91e 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -95,12 +95,13 @@ $(document).ready(function () {
     y = today.getFullYear();
     requiredDate = m + '/' + d + '/' + y;
     $("#date2").val(requiredDate);
+    alert($("#date2").val());
     $("#date2").datepicker({
         onSelect: function (date) {
             departure = $("#date2").val();
         }
     });
-    $(".page_item.page-item-150.current_page_item").find('a[href]').attr("href", "#").attr('onclick', "document.getElementById('form').submit();");
+    $(".page_item.page-item-150.current_page_item").find('a[href]').attr("href", "#").attr('onclick', "document.form.submit()");
     // off canvas menu values /////////////////////////
     $('#offGuests').blur(function () {
         guests = $('#offGuests').val();
index 14f1303..c4854b1 100644 (file)
@@ -86,12 +86,13 @@ $(document).ready(function () {
     y = today.getFullYear();
     requiredDate = m + '/' + d + '/' + y;
     $("#date2").val(requiredDate);
+    alert($("#date2").val());
     $("#date2").datepicker({
         onSelect: function (date) {
             departure = $("#date2").val();
         }
     });
-    $(".page_item.page-item-150.current_page_item").find('a[href]').attr("href", "#").attr('onclick', "document.getElementById('form').submit();");
+    $(".page_item.page-item-150.current_page_item").find('a[href]').attr("href", "#").attr('onclick', "document.form.submit()");
     // off canvas menu values /////////////////////////
     $('#offGuests').blur(function () {
         guests = $('#offGuests').val();