Give possibility to restrict country on google api search for find only one country.
Actually Google api does not allow multi country value => https://code.google.com/p/gmaps-api-issues/issues/detail?can=2&start=0&n...

This patch add checkbox field in component webform page, if this field is check, add Available country values in js.

Comments

niknak created an issue. See original summary.

mirabuck’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new2.19 KB

I like what's been done with this initial patch, but unless I'm mistaken, it will cause autocomplete to fail if the checkbox has been selected and multiple countries are available. Taking inspiration from niknak's original patch, I've created another.

My understanding is that we'll only be able to filter by a single country. If that's the case, maybe the checkbox is unnecessary as I suspect we'll always want to filter by a country when only one country is available. Working with that assumption I've removed the checkbox and setup filtering to only fire when a single country is available.

mirabuck’s picture

A small improvement. To prevent country-specific update from listening when we're only using a single country.

mirabuck’s picture

StatusFileSize
new2.9 KB

Typo in patch filename.

mirabuck’s picture

Ensure we know if we're doing country-specific filtering when we switch off update on country change.

  • lambic committed 2171875 on 7.x-1.x authored by Mirabuck
    Issue #2830233 by Mirabuck, niknak: Search limited country
    
lambic’s picture

patch committed to 1.x

lambic’s picture

Status: Needs review » Reviewed & tested by the community
lambic’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.