aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2019-09-05 10:34:54 +0100
committerStruan Donald <struan@exo.org.uk>2019-09-27 17:35:15 +0100
commit433474638e33c1320efd0b4826b5d4bbb655d69c (patch)
treef97b38a1f31c934e9aba041a79395c203df73b40 /perllib/FixMyStreet
parentb1f2ff77da367c06ff4f2c6ac41892131331c70e (diff)
[IsleOfWight] skip sending urgent field
This is only used to determine if we should block sending the form
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/IsleOfWight.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm
index 68ed2653e..864e53f36 100644
--- a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm
+++ b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm
@@ -56,6 +56,17 @@ sub open311_get_update_munging {
if !$comment->problem->is_open;
}
+sub open311_pre_send {
+ my ($self, $row, $open311) = @_;
+
+ return unless $row->extra;
+ my $extra = $row->get_extra_fields;
+ if (@$extra) {
+ @$extra = grep { $_->{name} ne 'urgent' } @$extra;
+ $row->set_extra_fields(@$extra);
+ }
+}
+
sub open311_config {
my ($self, $row, $h, $params) = @_;