~erobererunc/sahana-eden/tropo_xforms

« back to all changes in this revision

Viewing changes to modules/widgets.py

  • Committer: Fran Boon
  • Date: 2010-11-25 23:22:24 UTC
  • Revision ID: fran@aidiq.com-20101125232224-gg91eac2qpq4mxv0
A little more progress on the new Location Selector (still disabled)

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
            represent = ""
445
445
 
446
446
        add_button = A(T("Add New Location"), _id="gis_location_add-btn", _href="#", _class="action-btn")
447
 
        
 
447
 
 
448
        geolocate_button = A(T("Use Current Location"), _id="gis_location_geolocate-btn", _href="#", _class="action-btn hidden")
 
449
 
 
450
        map_button = A(T("Select using Map"), _id="gis_location_map-btn", _href="#", _class="action-btn hidden")
 
451
 
 
452
        geocode_button = A(T("Lookup Address"), _id="gis_location_geocode-btn", _href="#", _class="action-btn hidden")
 
453
 
 
454
        converter_button = A(T("Coordinate Converter"), _id="gis_location_converter-btn", _href="#", _class="action-btn hidden")
 
455
 
448
456
        return TAG[""](
449
457
                        INPUT(**attr), # Real input, which is hidden
450
458
                        dropdowns,
451
 
                        TR(INPUT(_id=dummy_input, _value=represent)),
452
459
                        TR(add_button),
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)
457
471
                      )
458
472