Skip to content

Refactors Location for profiles

Gabriel Silva requested to merge gabrielssilva/noosfero:location_signup into master

Changes the way users update the geographic locations. Address fields (country, state, city, zip_code, address and district) were replaced by a Location field, which also includes latitude and longitude, to be selected using a map.

A summary of the changes

  • Adds Location (latitude, longitude + address fields) field
    • It can be added as a required/signup field in the admin panel
    • The address fields are only used to help finding addresses in the map
    • The address fields will be updated according to the selection in the map, but can be edited manually
    • Location fields only appear in the control panel if the field is active in the environment
  • Removes address Fields (country, city, state, address, zip_code, district)
    • These fields are still setting_items, and they are still saved when the user selects a location.
  • Improves Location selection UI
  • Refactors some bugs in the google_maps.js
    • Adds Google Maps API key (must be configured in the noosfero.yml)
    • It will search if some location fields are not provided
    • Fixes how it display/hide the load cursor, and enables/disables the submit button

How the new location selection looks like in the control panel

Screen_Shot_2017-04-19_at_9.25.16_PM

How the new location selection looks like in the signup form

Screen_Shot_2017-04-19_at_9.27.34_PM

Merge request reports