templates/includes/events-navigation-bar.html.twig line 1

Open in your IDE?
  1. <div class="event-navigation-bar row" style="margin-bottom: 20px;">
  2.     <div class="col-9" id="mobile-resize">
  3.         <form class="row" method="post" action="/events">
  4.             <div class="col-4">
  5.                 <label class="form-label" for="eventDate">Events From</label>
  6.                 <input type="text" class="form-control" id="eventDate" name="eventDate" placeholder="mm/dd/yyyy" {% if date is defined %}value="{{date|date('m/d/Y')}}"{% endif %}>
  7.             </div>
  8.             <div class="col-4">
  9.                 <label class="form-label" for="eventSearch">Search</label>
  10.                 <input type="text" class="form-control" id="eventSearch" name="eventSearch" placeholder="Keyword" {% if search is defined %}value="{{search}}"{% endif %}>
  11.             </div>
  12.             <div class="col-4">
  13.                 <br>
  14.                 <button type="submit" class="button">FIND EVENTS</button>
  15.             </div>
  16.         </form>
  17.     </div>
  18.     <div class="col-3 hide-mobile">
  19.         <label class="form-label" for="eventView">View As</label>
  20.         <select class="form-control" id="eventView">
  21.             <option value="/events">List</option>
  22.             <option value="/events/month">Month</option>
  23.             <option value="/events/day">Day</option>
  24.         </select>
  25.     </div>
  26. </div>
  27. <script>
  28.     $(function(){
  29.       $('#eventView').on('change', function () {
  30.           var url = $(this).val();
  31.           if (url) {
  32.               window.location = url;
  33.           }
  34.           return false;
  35.       });
  36.       
  37.       $("#eventView").val('{{selected_view}}');
  38.       
  39.         var $window = $(window),
  40.         $html = $('#mobile-resize');
  41.         if ($window.width() < 767) {
  42.             $html.removeClass('col-9');
  43.             $html.addClass('col-12');
  44.         }
  45.     });
  46. </script>