aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm4
-rw-r--r--perllib/FixMyStreet/Cobrand/Northamptonshire.pm9
2 files changed, 13 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 8dec06e86..585337d8b 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -313,6 +313,10 @@ sub disable_form_message : Private {
my ( $self, $c ) = @_;
my %out;
+
+ # do not set disable form message if they are a staff user
+ return \%out if $c->cobrand->call_hook('staff_ignore_form_disable_form');
+
foreach (@{$c->stash->{category_extras}->{$c->stash->{category}}}) {
if ($_->{disable_form} && $_->{disable_form} eq 'true') {
$out{all} .= ' ' if $out{all};
diff --git a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
index 4ae3b6409..60def9e15 100644
--- a/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Northamptonshire.pm
@@ -137,4 +137,13 @@ sub report_validation {
}
}
+sub staff_ignore_form_disable_form {
+ my $self = shift;
+
+ my $c = $self->{c};
+
+ return $c->user_exists
+ && $c->user->belongs_to_body( $self->body->id );
+}
+
1;