diff options
-rw-r--r-- | perllib/FixMyStreet/Map/OSM.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/Tilma/Original.pm | 2 | ||||
-rwxr-xr-x | web/index.cgi | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Map/OSM.pm b/perllib/FixMyStreet/Map/OSM.pm index c57854f94..fb3770d23 100644 --- a/perllib/FixMyStreet/Map/OSM.pm +++ b/perllib/FixMyStreet/Map/OSM.pm @@ -65,6 +65,8 @@ sub display_map { my $copyright = _('Map © <a id="osm_link" href="http://www.openstreetmap.org/">OpenStreetMap</a> and contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'); my $compass = compass($q, $x_tile, $y_tile, $zoom); $out .= <<EOF; +<input type="hidden" name="latitude" id="fixmystreet.latitude" value="$params{latitude}"> +<input type="hidden" name="longitude" id="fixmystreet.longitude" value="$params{longitude}"> <input type="hidden" name="zoom" value="$zoom"> <script type="text/javascript"> var fixmystreet = { diff --git a/perllib/FixMyStreet/Map/Tilma/Original.pm b/perllib/FixMyStreet/Map/Tilma/Original.pm index 961e507df..6acdb3f4c 100644 --- a/perllib/FixMyStreet/Map/Tilma/Original.pm +++ b/perllib/FixMyStreet/Map/Tilma/Original.pm @@ -98,6 +98,8 @@ sub _display_map { $out .= <<EOF; <input type="hidden" name="x" id="formX" value="$x"> <input type="hidden" name="y" id="formY" value="$y"> +<input type="hidden" name="latitude" value="$params{latitude}"> +<input type="hidden" name="longitude" value="$params{longitude}"> EOF $img_type = '<input type="image"'; } else { diff --git a/web/index.cgi b/web/index.cgi index e801e076b..f8f119f54 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -610,6 +610,8 @@ please specify the closest point on land.')) unless %$all_councils; my $form_action = Cobrand::url($cobrand, '/', $q); $vars{form_start} = <<EOF; <form action="$form_action" method="post" name="mapSkippedForm"$enctype> +<input type="hidden" name="latitude" value="$latitude"> +<input type="hidden" name="longitude" value="$longitude"> <input type="hidden" name="pc" value="$input_h{pc}"> <input type="hidden" name="skipped" value="1"> $cobrand_form_elements @@ -722,10 +724,6 @@ photo of the problem if you have one), etc.')); $vars{text_help} .= $q->p(_('Please fill in details of the problem below.')); } - $vars{text_help} .= ' -<input type="hidden" name="latitude" id="fixmystreet.latitude" value="' . $latitude . '"> -<input type="hidden" name="longitude" id="fixmystreet.longitude" value="' . $longitude . '">'; - if (@errors) { $vars{errors} = '<ul class="error"><li>' . join('</li><li>', @errors) . '</li></ul>'; } |