diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-07-22 17:05:11 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-07-22 17:05:11 +0100 |
commit | 03388de7ea81464024abb23e8579e4d9dcfd5555 (patch) | |
tree | bbf29f0848ea9c258f993c9842a9f61cef789c6c | |
parent | 77d0e3934e1a77e941473d02f9b55685a9d57d83 (diff) |
If a form input has a name identical to an ID, OpenLayers in IE6/7 gets all confused.
m--------- | commonlib | 0 | ||||
-rw-r--r-- | perllib/FixMyStreet/App.pm | 2 | ||||
-rwxr-xr-x | templates/web/default/around/display_location.html | 4 | ||||
-rw-r--r-- | templates/web/default/report/new/fill_in_details.html | 4 |
4 files changed, 7 insertions, 3 deletions
diff --git a/commonlib b/commonlib -Subproject b332298ef86c673b48e6f55a73bdb0b8cf640ae +Subproject f2532c104a1268b536f79b13c52bdc0d7fb4d7a diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 29d224268..68bfc728b 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -180,7 +180,7 @@ sub setup_request { Memcached::set_namespace( FixMyStreet->config('BCI_DB_NAME') . ":" ); - my $map = $host =~ /^osm\./ ? 'OSM' : $c->req->param('map'); + my $map = $host =~ /^osm\./ ? 'OSM' : $c->req->param('map_override'); #if ($c->sessionid) { # $map = $c->session->{map}; # $map = undef unless $map eq 'OSM'; diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html index ebea99895..395054645 100755 --- a/templates/web/default/around/display_location.html +++ b/templates/web/default/around/display_location.html @@ -36,7 +36,9 @@ %] <form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm"> -<input type="hidden" name="map" value="[% c.req.params.map | html %]"> +[% IF c.req.params.map_override %] +<input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> +[% END %] <input type="hidden" name="pc" value="[% pc | html %]"> [% c.cobrand.form_elements('mapForm') %] diff --git a/templates/web/default/report/new/fill_in_details.html b/templates/web/default/report/new/fill_in_details.html index 32d4a733b..8150ba894 100644 --- a/templates/web/default/report/new/fill_in_details.html +++ b/templates/web/default/report/new/fill_in_details.html @@ -5,7 +5,9 @@ [% IF report.used_map %] <form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> -<input type="hidden" name="map" value="[% c.req.params.map | html %]"> +[% IF c.req.params.map_override %] +<input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> +[% END %] <input type="hidden" name="pc" value="[% pc | html %]"> [% c.cobrand.form_elements('mapForm') %] [% ELSE %] |