aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
Commit message (Collapse)AuthorAgeLines
* improve report new munge namesStruan Donald2019-09-27-1/+1
|
* [IsleOfWight] limit filter category on national around pageStruan Donald2019-09-27-3/+4
| | | | | | | | | Only display non triage categories on this because getting the category expansion to work if we use the triage categories isn't in place and may not be. This is because when we get the list of reports using /around/ajax there's no way to know which body it is for so we don't know how to expand a triage category to the list of 'child' categories. So, just display the non triage ones for now.
* do not send triage comments in alertsStruan Donald2019-09-27-1/+14
| | | | | | add a check into the Alerts script to skip comments that have `triage_report` set in extra. Otherwise we send these our in new_updates alerts.
* [IsleOfWight] correctly filter categories on report pageStruan Donald2019-09-27-1/+4
| | | | | | | | If it's a standard user only display the Triage category list but if one of these is selected then look up all the categories in that group and use those to select the reports to display. It it's a staff user then ignore the Triage categories.
* [IsleOfWight] correctly handle triage categories on reports/around pagesStruan Donald2019-09-27-3/+10
| | | | | | | | | | | | | | Add in some cobrand handlers to make sure a) the appropriate categories are show to staff/non staff users on the around and reports pages b) that those categories are correctly expanded to the child categories when using the category filter to search reports This is because non staff users should only be shown Isle of Wight categories with a send_method of 'Triage', however once those reports are triaged the post triage categories need to be included in any filtering
* [IsleOfWight] add an admin interface to triage reportsStruan Donald2019-09-27-2/+161
| | | | | | | | | | | | | | | | | | On reports with a state of `for_triage` override the `_inspect.html` template to display one which allows only allows the user to change the category from one with a 'Triage' send_method to a non Triage send_method. When saved this records a comment with the original category and the category it was triaged to. This is hidden from the site as it's only used for audit purposes and sending over Open311. This assumes that the triage categories have the same names as the groups of the confirm categories. It uses this to select the first confirm category in the group corresponding to the triage category. This also makes the sidebar geolocation onclick handler check for the presence of the button, as the triage inspect form does not have it.
* [IsleOfWhite] make sure category_extras uses correct nameStruan Donald2019-09-27-6/+11
|
* [Open311] Spot <groups> parameter rather than CSV.Matthew Somerville2019-09-20-2/+0
|
* strip quote from contact group namesStruan Donald2019-09-19-0/+2
| | | | | | | | | | | | | | | | When an open311 category has multiple groups it puts them in the groups element using CSV escaping. This means that group names can sometimes feature double quotes. If we send these to the front end then putting them into the optgroup name attribute breaks the HTML as if the group name is in the database as `"group name"` you end up with <optgroup name="" group="" name=""> instead of <optgroup name="group name"> Hence, stripping the double quotes.
* Make sure determine_contact_type called later.Matthew Somerville2019-09-12-1/+2
| | | | | | | The request cobrand is set on the schema during the app's setup_request(), which is called by the root auto action. So anything in a controller's begin action will access an incorrect cobrand (if one has already been set).
* Merge branch 'nicer-non-js-category-stuff'Matthew Somerville2019-09-06-8/+53
|\
| * Improve user flow when JavaScript is not availableMatthew Somerville2019-09-05-3/+49
| | | | | | | | | | | | | | This improves the reporting journey to only ask for category, and then category extra questions if appropriate, first, so that if the choice would lead to the form being disabled, this can be shown immediately.
| * Slightly simplify new report category handling.Matthew Somerville2019-09-05-7/+6
| |
* | Merge branch 'issues/commercial/1543-asset-ordering'Matthew Somerville2019-09-05-1/+10
|\ \ | |/ |/|
| * Make sure extras hidden when only_send is active.Matthew Somerville2019-09-04-1/+10
| | | | | | | | | | | | | | | | The extras may be a confusing stopper message that only applies to the 'main' body, or it may be extra questions that are now not required. Either way, we should hide this information, and we need to make sure the server no longer checks if required extra questions have been answered.
* | Allow contact send method to be unset always.Matthew Somerville2019-09-05-1/+1
|/ | | | | | If a body was set to Open311, and a contact set to Email, it was impossible to unset the contact's send method and set an Open311 code, because it would always demaned a valid email address.
* Merge branch 'issues/1515-disable-form-flag'Matthew Somerville2019-08-29-0/+30
|\
| * Allow form-disabling per Open311 question answer.Matthew Somerville2019-08-29-7/+18
| |
| * Add admin to disable reporting form per category.Dave Arter2019-08-29-0/+19
| | | | | | | | | | Remove all existing hard-coded register_category calls, and have a new way of implementing staff_ignore.
* | Make sure anonymous reports are marked anon irrespective of permissionsDave Arter2019-08-29-0/+2
|/ | | | | | | | | | | | | | There was a small bug where the 'default_to_body' permission would override the 'report anonymously' button when staff users were adding reports to the site. The result of this was that the name of the anonymous user record would be shown. No harm done, as that user's name would likely be set to "Anonymous user" in config, but it resulted in reports pages showing the slightly odd wording along the lines of: Reported in the Bin bags category by Anonymous user at 14:57 today This commit ensures the contributing_as_body flag is mutually exclusive with the 'report_anonymously' request parameter.
* [Open311] Add 'protected' category extra flag.Struan Donald2019-08-23-0/+2
| | | | | If an extra field on a category has a protected flag then do not overwrite or remove it when populating categories.
* Ignore very new reports in admin unsent list.Matthew Somerville2019-08-23-0/+2
|
* $user->latest_visible_problem() convenience methodZarino Zappia2019-08-23-10/+2
|
* Include user admin links in contact form emailsZarino Zappia2019-08-23-0/+25
| | | | | | | | | | | | | | | If a message is sent via the contact form, with a stated email address matching a user in the database, the resulting email will now include quick links to: - Admin page for editing the user - Admin page for viewing the user’s reports And if the user has made at least one report, also: - Admin page for the user’s most recent report This should speed up admin email triage considerably.
* Display dummy content in /_dev/email/contact previewZarino Zappia2019-08-23-0/+15
|
* Always return a name string if login successful.Matthew Somerville2019-08-22-1/+2
| | | | The app checks if name is set as a test for successful login.
* Allow OIDC auth to provide its own ‘change password’ URIDave Arter2019-08-16-12/+40
|
* [Westminster] Do not create any reporter alerts.Matthew Somerville2019-08-16-0/+1
|
* Preserve partial report if resetting password during OIDC loginDave Arter2019-08-16-1/+10
|
* Tidy up closed_updates/updates_disallowed a bit.Matthew Somerville2019-08-16-2/+1
|
* Add test for OIDC logout redirectionDave Arter2019-08-16-9/+27
|
* Improve checking of OIDC ID tokens, and handle OIDC forgotten password flow ↵Dave Arter2019-08-16-3/+25
| | | | correctly
* Handle forgotten password OIDC flowDave Arter2019-08-16-3/+21
|
* Add support for OIDC logoutDave Arter2019-08-16-0/+15
|
* Allow cobrand to store extra fields on user when logging in via oauthDave Arter2019-08-16-3/+34
|
* Allow anonymous submission by a button.Matthew Somerville2019-08-16-1/+8
|
* Improve user-anonymous reporting.Matthew Somerville2019-08-16-5/+15
| | | | | Make it more like the staff-creation, with no confirmation email, and no messing with the user.
* Add OpenID Connect login functionalityDave Arter2019-08-16-38/+151
|
* Set user’s name when creating user via OAuthDave Arter2019-08-16-0/+4
|
* Make sure existing attribute answers set up.Matthew Somerville2019-08-09-1/+10
| | | | | | | If you come to /report/new with a part-filled report (say you've gone via an OAuth flow), then the stash needs to get the category from the report, not a query parameter, and report_meta needs initializing, as that is what the template uses to fill in existing attribute answers.
* Merge branch 'westminster-report-dupe-bugs'Matthew Somerville2019-08-08-0/+60
|\
| * Hide category extras when dupe suggestions shown.Matthew Somerville2019-08-07-0/+60
| |
* | Redirect correctly after editing user to remove them from cobrandDave Arter2019-08-07-2/+15
|/
* [Open311] Receive update from external request.Matthew Somerville2019-07-15-0/+88
|
* [Open311] Improve JSON output of controller.Matthew Somerville2019-07-15-9/+17
|
* Do not store display-only extra fields on reports.Matthew Somerville2019-07-12-1/+1
|
* Ignore cache-busting keyword on appcache.Matthew Somerville2019-07-11-1/+1
| | | | | | `params` changed in Catalyst 5.90116 to always include a sole keyword parameter (ie. with no equals sign) as a key with an undefined value; the changelog entry is only "improved test cases for query keywork".
* Allow password hash setting in user import.Matthew Somerville2019-07-10-10/+10
|
* Update UI text when selecting a private categoryDave Arter2019-07-09-9/+8
| | | | | | | This makes it clearer that all details for a report made in a private category will not be shown publicly. Fixes mysociety/fixmystreet-commercial#1405
* Indicate in report new AJAX if a category is privateDave Arter2019-07-09-0/+2
|