Source: site.view [edit]
Function name: buy2
Arguments:
Description: OPTIONALARGS: Key, Message
Page type: html
Render function:  
Module: maybeathome

Page source:

<!DOCTYPE html>
<html lang="en">

        <webl>WubCall("maybeathome.header", ["buy"] + OPTIONALARGS);</webl>
          
        <!--  Top Video Wrapper Starts  -->
        <div class="top-video-wrapper">
            <video autoplay  poster="assets/video/poster/home.jpg" id="bgvid" class="main-banner" loop>
                <!-- WCAG general accessibility recommendation is that media such as background video play through only once. Loop turned on for the purposes of illustration; if removed, the end of the video will fade in the same way created by pressing the "Pause" button  -->
                <!-- source src="assets/video/webm/home.webm" type="video/webm" -->
                <source src="assets/video/mp4/composite.mp4" type="video/mp4">
                <!-- source src="assets/video/ogv/home.ogv" type="video/ogv" -->
            </video>
            <div class="top-video-inner-wrapper">
                <div class="container">
                    <img src="assets/images/maybeathome-logo.png" alt="maybeathome-logo"/>
                    <h2 data-localize="buy.slogan">Try before you buy</h2>
                    <h4 data-localize="buy.subslogan">Before buying a property, stay there to make sure you love it</h4>
                    <form class="form-inline" name="searchform" action="/webl/WubHub_DoIt" method="post">
                      <input name="cmdline" 
                        value="maybeathome.searchProperties(sessionkey, type, address, price, beds, baths, rooms, size, lotSize, features, description)"
                        type="hidden"/>  
                      
                      <input name="size" value="" type="hidden">
                      <input name="lotSize" value="" type="hidden">
                      <input name="beds" value="" type="hidden">
                      <input name="baths" value="" type="hidden">
                      <input name="rooms" value="" type="hidden">
                      
                      <webl>
                         var sessionkey = wubinfo.cookies.sessionkey ? nil; 
                         if (sessionkey != nil) then
                            `<input type="hidden" name="sessionkey" value="` + sessionkey + `" />` + "\n";
                         else
                            `<input type="hidden" name="sessionkey" value="nil" />` + "\n";
                         end;
                      </webl>
          

                      <webl>
                        var msg = "";
                        if Size(OPTIONALARGS) > 1 then
                           msg = OPTIONALARGS[1]
                        end;
                        if (msg != "") then
                           "<p class='message'>" + msg + "</p>\n"
                        else
                           ""
 					    end;
                      </webl>
                      <div class="form-group buy-wrapper">
                            <label class="sr-only" for="buy">Buy</label>
                            <select class="form-control" id="buy" name="type" multiple>
                                <option selected data-localize="buy.existingHouse">House</option>
                                <option data-localize="buy.existingApartment">Apartment</option>
                                <option data-localize="buy.newHouse">New House</option>
                                <option data-localize="buy.newApartment">New Apartment</option>
                            </select>
                        </div>                      
                        <div class="form-group city-wrapper">
                            <label class="sr-only" for="city" data-localize="buy.location">Location</label>
                            <input type="text" class="form-control" id="address" name="address" data-localize="buy.location" onFocus="geolocate()" 
                                   placeholder="Neighborhood, City, Department or Area">
                        </div>
                      
                        <!-- Hidden fields that break up address into constituent parts -->
                             <input type="hidden"  id="street_number_hid" name="street_number_hid">
                             <input type="hidden"  id="route_hid" name="route_hid">
                             <input type="hidden"  id="locality_hid" name="locality_hid">
                             <input type="hidden"  id="administrative_area_level_1_hid" name="administrative_area_level_1_hid" >
                             <input type="hidden"  id="administrative_area_level_2_hid" name="administrative_area_level_2_hid">
                             <input type="hidden"  id="country_hid" name="country_hid">
                             <input type="hidden"  id="postal_code_hid" name="postal_code_hid">
                              
                      
                        <div class="form-group price-wrapper">
                            <label class="sr-only" for="maxPrice" data-localize="buy.maxPrice">Max Price</label>
                            <input type="text" class="form-control" id="maxPrice" name="price" data-localize="buy.maxPrice" placeholder="Max Price">
                        </div>
                        <div class="form-group price-wrapper">
                            <label class="sr-only" for="availability" data-localize="buy.availability">Availability</label>
                            <input type="text" class="form-control" id="availability" name="availability" data-localize="buy.availability" placeholder="Availability">
                        </div>
                        <button type="submit" class="btn btn-success btn-custom"><i class="glyphicon glyphicon-search"></i></button>
                        <a href="#" onclick="document.forms['searchform'].submit(); return false;"" class="advance-search" data-localize="buy.advancedSearch">Advanced Search</a>
                    </form>
                </div>
            </div>
        </div> 
        <!--  Top Video Wrapper Ends  -->

       <webl>WubCall("maybeathome.footer", ["buy"] + OPTIONALARGS); </webl>
  
       <webl>WubCall("maybeathome.autocomplete", []); </webl>
  
       <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAO2RntyX5IUgDJmXO-i39U06wwIhKwdEE&libraries=places&callback=initAutocomplete"
        async defer></script>
      </body>
</html>