diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-04-17 14:25:25 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-04-26 13:39:27 +0100 |
commit | cad3ef53f5cb1b47ff8922aef188a831b4110aab (patch) | |
tree | 6be585d6e91f580786f8533d964bdc134aa592d1 /perllib/FixMyStreet | |
parent | 2a7d70db634b1e8a5f32d99c34bf682ca7dc3a42 (diff) |
Work much better if reporting pin is clicked/dragged in/out of council boundary (CM17).
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index b40f13d9d..69c4b18d4 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -56,9 +56,16 @@ sub council_check { return 1; } my $url = 'http://www.fixmystreet.com/'; - $url .= 'alert' if $context eq 'alert'; + if ($context eq 'alert') { + $url .= 'alert'; + } else { + $url .= 'around'; + } $url .= '?pc=' . URI::Escape::uri_escape( $self->{c}->req->param('pc') ) if $self->{c}->req->param('pc'); + $url .= '?latitude=' . URI::Escape::uri_escape( $self->{c}->req->param('latitude') ) + . '&longitude=' . URI::Escape::uri_escape( $self->{c}->req->param('longitude') ) + if $self->{c}->req->param('latitude'); my $error_msg = "That location is not covered by " . $self->council_name . ". Please visit <a href=\"$url\">the main FixMyStreet site</a>."; return ( 0, $error_msg ); |