diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 2 | ||||
-rw-r--r-- | templates/web/base/admin/template_edit.html | 2 |
6 files changed, 8 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c88424c55..8b54031a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ - Don't strip whitespace from user passwords. #2111 - Make OpenGraph description translatable. - Stop double-escaping title in alert-update email. + - Use inspection states in response template admin. - Admin improvements: - Inspectors can set non_public status of reports. #1992 - Default start date is shown on the dashboard. diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 574ef0390..331067c1a 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -979,8 +979,7 @@ sub process_report : Private { } # set defaults that make sense - $report->state('unconfirmed'); - $report->state('submitted') if $c->cobrand->moniker eq 'zurich'; + $report->state($c->cobrand->default_problem_state); # save the cobrand and language related information $report->cobrand( $c->cobrand->moniker ); diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 5dd5a5959..dc9e2c913 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -747,6 +747,7 @@ sub stash_report_sort : Private { created => 'confirmed', comments => 'comment_count', ); + $types{created} = 'created' if $c->cobrand->moniker eq 'zurich'; my $sort = $c->get_param('sort') || $default; $sort = $default unless $sort =~ /^((updated|created)-(desc|asc)|comments-desc|shortlist)$/; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 92494250e..816c5e315 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -1068,6 +1068,8 @@ sub show_unconfirmed_reports { 0; } +sub default_problem_state { 'unconfirmed' } + sub state_groups_admin { my $rs = FixMyStreet::DB->resultset("State"); my @fixed = FixMyStreet::DB::Result::Problem->fixed_states; diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 1acbdaf71..b2a0e331d 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -1278,6 +1278,8 @@ sub singleton_bodies_str { 1 } sub contact_extra_fields { [ 'abbreviation' ] }; +sub default_problem_state { 'submitted' } + sub db_state_migration { my $rs = FixMyStreet::DB->resultset('State'); diff --git a/templates/web/base/admin/template_edit.html b/templates/web/base/admin/template_edit.html index 428aa46ac..0cfd5406a 100644 --- a/templates/web/base/admin/template_edit.html +++ b/templates/web/base/admin/template_edit.html @@ -51,7 +51,7 @@ </div> <p> <label for="state">[% loc('State') %]</label> - [% INCLUDE 'admin/state_groups_select.html' current_state=rt.state include_empty=1 %] + [% INCLUDE 'report/inspect/state_groups_select.html' current_state=rt.state include_empty=1 %] </p> [% IF errors.external_status_code %] |