446
446
add_button = A(T("Add New Location"), _id="gis_location_add-btn", _href="#", _class="action-btn")
448
geolocate_button = A(T("Use Current Location"), _id="gis_location_geolocate-btn", _href="#", _class="action-btn hidden")
450
map_button = A(T("Select using Map"), _id="gis_location_map-btn", _href="#", _class="action-btn hidden")
452
geocode_button = A(T("Lookup Address"), _id="gis_location_geocode-btn", _href="#", _class="action-btn hidden")
454
converter_button = A(T("Coordinate Converter"), _id="gis_location_converter-btn", _href="#", _class="action-btn hidden")
449
457
INPUT(**attr), # Real input, which is hidden
451
TR(INPUT(_id=dummy_input, _value=represent)),
453
TR(TEXTAREA(_id="gis_location_addr_street", _class="hidden", _value=addr_street)),
454
TR(INPUT(_id="gis_location_lat", _class="hidden", _value=lat)),
455
TR(INPUT(_id="gis_location_lon", _class="hidden", _value=lon)),
460
TR(DIV(geolocate_button, map_button)),
461
TR(DIV(LABEL(T("Name") + ":"), SPAN("*", _class="req"), _id="gis_location_name_label", _class="hidden")),
462
TR(INPUT(_id=dummy_input, _value=represent, _class="hidden")),
463
TR(LABEL(T("Street Address") + ":", _id="gis_location_addr_street_label", _class="hidden")),
464
TR(DIV(TEXTAREA(_id="gis_location_addr_street", _class="hidden", _value=addr_street), geocode_button)),
465
TR(DIV(T("Advanced") + ":", INPUT(_type="checkbox", _id="gis_location_advanced_checkbox"), _id="gis_location_advanced_div", _class="hidden")),
466
TR(LABEL(T("Latitude") + ":", _id="gis_location_lat_label", _class="hidden")),
467
TR(INPUT(_id="gis_location_lat", _value=lat), db.gis_location.lat.comment, _id="gis_location_lat_row", _class="hidden"),
468
TR(LABEL(T("Longitude") + ":", _id="gis_location_lon_label", _class="hidden")),
469
TR(INPUT(_id="gis_location_lon", _value=lon), db.gis_location.lon.comment, _id="gis_location_lon_row", _class="hidden"),
456
470
SCRIPT(js_location_selector)