diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-02-20 16:43:09 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-02-26 11:35:10 +0000 |
commit | 11d77bf4cf0a15cf47748f351139f779752395b1 (patch) | |
tree | ab81e229bebebc7f5ab47a8d39643754ea14a803 | |
parent | 6954823390e7332bd8d1ab0afa28b3c0fb02db39 (diff) |
Also check filter_category for category choice.
If you submit the non-JS image map from an around page with a particular
category selected, that is sent to the server in filter_category and
should be checked to see if we can pre-fill the category dropdown on new
report.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 38cafc2ad..2e7c47cb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Improved try again process on mobile. #2863 - Improve messaging/display of private reports. - Add a web manifest and service worker. #2220 + - Also check filter_category for category choice. #2893 - Admin improvements: - Add new roles system, to group permissions and apply to users. #2483 - Contact form emails now include user admin links. diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 14aa7b83e..53d686e55 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -1554,6 +1554,8 @@ sub check_for_category : Private { my $category = $c->get_param('category') || $c->stash->{report}->category || ''; $category = '' if $category eq _('Loading...') || $category eq _('-- Pick a category --'); + # Just check to see if the filter had an option + $category ||= $c->get_param('filter_category') || ''; $c->stash->{category} = $category; # Bit of a copy of set_report_extras, because we need the results here, but |