diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 7 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Oxfordshire.pm | 9 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 13 |
3 files changed, 29 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 56e365050..1fdbe9de2 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -1188,4 +1188,11 @@ sub category_extra_hidden { return 0; } +sub traffic_management_options { + return [ + _("Yes"), + _("No"), + ]; +} + 1; diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm index dca208e98..e58c7f36b 100644 --- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm +++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm @@ -121,4 +121,13 @@ sub contact_email { sub admin_user_domain { 'oxfordshire.gov.uk' } +sub traffic_management_options { + return [ + "Signs and Cones", + "Stop and Go Boards", + "High Speed Roads", + ]; +} + + 1; diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index e42e7110a..0092dd8b5 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -1056,4 +1056,17 @@ has duplicates => ( }, ); +has traffic_management_options => ( + is => 'ro', + lazy => 1, + default => sub { + my $self = shift; + my $cobrand = $self->get_cobrand_logged; + if ( $cobrand->can('get_body_handler_for_problem') ) { + $cobrand = $cobrand->get_body_handler_for_problem( $self ); + } + return $cobrand->traffic_management_options; + }, +); + 1; |