diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm b/perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm index 7983a6e4d..2613f6ae0 100644 --- a/perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm +++ b/perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm @@ -65,6 +65,7 @@ sub edit : Path : Args(2) { $priority->name( $c->get_param('name') ); $priority->description( $c->get_param('description') ); $priority->external_id( $c->get_param('external_id') ); + $priority->is_default( $c->get_param('is_default') ? 1 : 0 ); $priority->update_or_insert; my @live_contact_ids = map { $_->id } @live_contacts; diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index 60d373a16..e37e08698 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -320,6 +320,12 @@ sub inspect : Private { $c->stash->{post_inspect_url} = $c->req->referer; } + if ($c->user->has_body_permission_to('report_edit_priority') or + $c->user->has_body_permission_to('report_inspect') + ) { + $c->stash->{has_default_priority} = scalar( grep { $_->is_default } $problem->response_priorities ); + } + if ( $c->get_param('save') ) { $c->forward('/auth/check_csrf_token'); |