aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App.pm1
-rw-r--r--perllib/FixMyStreet/Script/Questionnaires.pm3
-rw-r--r--templates/web/base/front/stats.html2
-rw-r--r--templates/web/base/report/update/form_update.html2
-rw-r--r--templates/web/base/reports/_list-filters.html4
5 files changed, 10 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index b7bbc8a0a..d782890bc 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -219,6 +219,7 @@ sub setup_request {
mySociety::MaPit::configure( "http://$host/fakemapit/" );
}
+ $c->stash->{has_fixed_state} = FixMyStreet::DB::Result::Problem::fixed_states->{fixed};
$c->cobrand->call_hook('setup_states');
if (FixMyStreet->test_mode) {
diff --git a/perllib/FixMyStreet/Script/Questionnaires.pm b/perllib/FixMyStreet/Script/Questionnaires.pm
index 3f22eb150..ec6139d2d 100644
--- a/perllib/FixMyStreet/Script/Questionnaires.pm
+++ b/perllib/FixMyStreet/Script/Questionnaires.pm
@@ -16,6 +16,9 @@ sub send {
sub send_questionnaires_period {
my ( $period, $params ) = @_;
+ # Don't send if we don't have a fixed state
+ return unless FixMyStreet::DB::Result::Problem::fixed_states->{fixed};
+
my $rs = FixMyStreet::DB->resultset('Questionnaire');
# Select all problems that need a questionnaire email sending
diff --git a/templates/web/base/front/stats.html b/templates/web/base/front/stats.html
index eb671137b..41358c869 100644
--- a/templates/web/base/front/stats.html
+++ b/templates/web/base/front/stats.html
@@ -35,7 +35,9 @@
<div id="front_stats">
<div>[% tprintf( new_text, decode(new_n) ) %]</div>
+ [% IF has_fixed_state %]
<div>[% tprintf( fixed_text, decode(fixed_n) ) %]</div>
+ [% END %]
[% IF c.cobrand.moniker != 'zurich' %]
<div>[% tprintf( updates_text, decode(updates_n) ) %]</div>
[% END %]
diff --git a/templates/web/base/report/update/form_update.html b/templates/web/base/report/update/form_update.html
index c988e0593..5a1b3b602 100644
--- a/templates/web/base/report/update/form_update.html
+++ b/templates/web/base/report/update/form_update.html
@@ -48,7 +48,7 @@
<label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
[% END %]
- [% ELSIF !problem.is_fixed %]
+ [% ELSIF !problem.is_fixed AND has_fixed_state %]
<div class="checkbox-group">
<input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html
index 329e481ae..50e88857d 100644
--- a/templates/web/base/reports/_list-filters.html
+++ b/templates/web/base/reports/_list-filters.html
@@ -19,7 +19,9 @@
[% ELSE %]
<option value="open"[% ' selected' IF filter_status.open %]>[% prettify_state('confirmed') %]</option>
<option value="closed"[% ' selected' IF filter_status.closed %]>[% prettify_state('closed') %]</option>
- <option value="fixed"[% ' selected' IF filter_status.fixed %]>[% prettify_state('fixed') %]</option>
+ [% IF has_fixed_state %]
+ <option value="fixed"[% ' selected' IF filter_status.fixed %]>[% prettify_state('fixed') %]</option>
+ [% END %]
[% END %]
</select>
[% END %]