aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@fury.ukcod.org.uk>2011-02-26 20:15:16 +0000
committerMatthew Somerville <matthew@fury.ukcod.org.uk>2011-02-26 20:15:16 +0000
commitfd658b05fe1c2fc1ae2fdd75f3dcd24576e16e23 (patch)
tree002202dfe4384e71d132b71a243fee3b8536842c
parent339c3e2adf801d19ac7c98d429d98f3a7f4a3ae1 (diff)
Output lon/lat fields in correct places.
-rw-r--r--perllib/FixMyStreet/Map/OSM.pm2
-rw-r--r--perllib/FixMyStreet/Map/Tilma/Original.pm2
-rwxr-xr-xweb/index.cgi6
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 &copy; <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>';
}