diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-04-26 13:54:11 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-04-26 13:54:11 +0100 |
commit | 9a758e4041f5221a2fbf8c4121b2601d2162241e (patch) | |
tree | 18868e484019d21e8a97b691eea2f53c7eadbbd2 | |
parent | cad3ef53f5cb1b47ff8922aef188a831b4110aab (diff) |
Area type for Barangay, and hack for working out/in boundaries. Error handling needs looking at.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Council.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyBarangay.pm | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index e110cf8d7..0901599ed 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -45,7 +45,7 @@ sub around_index : Path : Args(0) { || $c->forward('/location/determine_location_from_pc'); # Check to see if the spot is covered by a council - if not show an error. - return unless $c->forward('check_location_is_acceptable'); + return unless $c->cobrand->moniker eq 'fixmybarangay' || $c->forward('check_location_is_acceptable'); # If we have a partial - redirect to /report/new so that it can be # completed. diff --git a/perllib/FixMyStreet/App/Controller/Council.pm b/perllib/FixMyStreet/App/Controller/Council.pm index 1d801c292..7a0f9b73f 100644 --- a/perllib/FixMyStreet/App/Controller/Council.pm +++ b/perllib/FixMyStreet/App/Controller/Council.pm @@ -85,6 +85,7 @@ sub load_and_check_councils : Private { # If we don't have any councils we can't accept the report if ( !scalar keys %$all_councils || $all_councils->{error}) { $c->stash->{location_offshore} = 1; + $c->stash->{location_error} = 'That point is outside the boundaries.'; return; } diff --git a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm index 01e0670d6..8b172e854 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm @@ -16,6 +16,10 @@ sub country { return 'PH'; } +sub area_types { + return ( 'BGY' ); +} + sub disambiguate_location { return { country => 'ph', |