diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-11 16:26:16 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-19 17:02:04 +0000 |
commit | 584b6297f229f5fa2e1c0b44d9078a7b09e83e63 (patch) | |
tree | 72ec475e98874cabae576cc31ad1aa2887b05364 /perllib/FixMyStreet/Cobrand/Buckinghamshire.pm | |
parent | cfb0dd09a7be10d6443995930cbb8739f4d1ecc7 (diff) |
[Buckinghamshire] Get topic when reporting abuse.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Buckinghamshire.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Buckinghamshire.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm index 1b437b2c5..055e481d9 100644 --- a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm +++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm @@ -358,5 +358,24 @@ sub lookup_site_code_config { { } } } +sub extra_contact_validation { + my $self = shift; + my $c = shift; + + # Don't care about dest unless reporting abuse + return () unless $c->stash->{problem}; + + my %errors; + + $c->stash->{dest} = $c->get_param('dest'); + + if (!$c->get_param('dest')) { + $errors{dest} = "Please enter a topic of your message"; + } elsif ( $c->get_param('dest') eq 'council' || $c->get_param('dest') eq 'update' ) { + $errors{not_for_us} = 1; + } + + return %errors; +} 1; |