ckan / ckanext-spatial

Geospatial extension for CKAN
http://docs.ckan.org/projects/ckanext-spatial
126 stars 193 forks source link

Ensure the bbox input is in the correct form #322

Open markstuart opened 10 months ago

markstuart commented 10 months ago

In our particular customisation of CKAN we have 2 forms with the class of 'search-form', and this class is used to ensure styling consistency.

With the way this was set up before, both forms were getting a ext_bbox input injected into them, but then only the first one on the page was getting the bbox value set on it. This unfortunately was not the search form that actually needed the bbox value.

With these changes, I'm trying to scope the ext_bbox input to only the actual dataset search form.

In general, I think actions like this should try to target elements by ID's where possible, rather than using classes, which should be used more for defining styling to be applied to that class, but unsure what the CKAN team preferences are on this.