aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Roles
Commit message (Collapse)AuthorAgeLines
* [UK Councils] Ensure response templates owned by other bodies aren’t visibleDave Arter2019-12-09-2/+9
|
* [Peterborough] add title length restrictionStruan Donald2019-12-03-0/+6
| | | | Fixes mysociety/fixmystreet-freshdesk#102
* [UK] Fix couple of test warnings.Matthew Somerville2019-10-28-1/+1
| | | | Confirm phone validation, Westminster test name, BANES undef.
* [UK] Factor out Confirm open311_config to role.Matthew Somerville2019-10-28-0/+39
|
* Merge remote-tracking branch 'origin/master'Matthew Somerville2019-10-28-0/+20
|\
| * add a get_extra_field method to Extra roleStruan Donald2019-10-28-0/+20
| | | | | | | | | | accepts name or code for finding the field. Useful for checking for individual open311 fields that don't have a value.
* | Allow cobrands to override category display.Matthew Somerville2019-10-25-13/+0
|/
* [fixmystreet.com] Generalise emergency message script.Matthew Somerville2019-10-21-0/+2
|
* Add two new helper functions to Roles::Extra.Matthew Somerville2019-09-30-0/+50
| | | | For updating/removing an extra field.
* Improve non_public photo handling.Matthew Somerville2019-05-07-2/+5
| | | | | | | Clear the photo cache if the non_public flag is switched on, do not cache non_public or LOGIN_REQUIRED photos, remove non_public photos from memcached recent lists, pass through any cookies on non_public reports/updates, and check the non_public flag on photo lookup.
* Avoid string evalTom Hukins2019-04-09-3/+2
| | | | Instead, load the required module directly.
* Spot moderation conflicts.Matthew Somerville2019-01-25-2/+8
| | | | | If someone tries to moderate after someone else has, re-show the form and an error.
* Remove any use of `my $x if $foo`.Matthew Somerville2019-01-14-1/+2
| | | | | | | | As perlsyn says, "NOTE: The behaviour of a `my`, `state`, or `our` modified with a statement modifier conditional or loop construct (for example, `my $x if ...`) is undefined. The value of the `my` variable may be `undef`, any previously assigned value, or possibly anything else."
* Associate moderation history with admin log.Matthew Somerville2018-11-27-0/+41
|
* [UK] fix line break in translated stringStruan Donald2018-11-26-2/+1
| | | | To avoid adding a new, but identical translation
* [UK] server side cobrand specific validationStruan Donald2018-11-26-0/+39
| | | | | | `report_check_for_errors` now fetches the cobrand for the current report and, if present, runs `report_validation` method from cobrand over the report.
* [Zurich] Allow publishing of individual photos.Matthew Somerville2018-01-18-0/+34
| | | | | When more than one photo has been uploaded, allow each one to be published/not independently.
* Add ability to confirm reports/updates via text.Matthew Somerville2017-09-30-2/+3
|
* Add Extra->get_extra_field_valueDave Arter2017-08-31-0/+16
| | | | Allows easy display of Open311 field values for problems in templates
* Reduce queries on /report when loading defect types/prioritiesDave Arter2017-08-18-1/+5
|
* Ignore translation if fewer than two languages.Matthew Somerville2017-08-15-0/+4
|
* Add fn to fetch bodies plus the translated names.Matthew Somerville2017-08-15-0/+3
|
* Remember translation lookup for request remainder.Matthew Somerville2017-08-15-2/+14
|
* Prevent unnecessary string translation.Matthew Somerville2017-08-11-1/+1
| | | | | | Calling the function 'translate' causes gettext-extract to add the string to the .po file. Also, we no longer need an admin 'updated' message as the main form has its own success message.
* fetch and create translation methods for translatableStruan Donald2017-08-10-0/+45
| | | | | | | | | | | | Add a `translation_for` method and an `add_transation` method to Translatable to help hide the details when editing and listing translations. `translation_for` returns all translations if only passed a column or a single translation if passed with a column and a language. `add_translation` will add, or update, a translation if passed in the column, language and string.
* Set up translatable category columns.Matthew Somerville2017-08-10-0/+13
| | | | | | As category is used both for display and as a link between Problem and Contact tables, add `category_display` for use whenever a category is displayed.
* Set up translatable body name.Matthew Somerville2017-08-09-0/+39
|
* Update templates when category/state changed.Matthew Somerville2017-06-30-1/+2
| | | | | | When the category or state changes, the list of available templates updates (previously it was frozen at what the category was on page load, and didn't care about the state).
* Populate defect types dropdown on category changepezholio2017-06-20-0/+43
|
* Improve display of category extra data in admin.Matthew Somerville2016-09-09-20/+8
| | | | Allow get_extra_metadata to return all the data with no argument.
* Move photoset stuff to new Role.Matthew Somerville2016-08-01-0/+35
|
* Move from Moose to Moo in non-App code.Matthew Somerville2015-12-02-6/+3
| | | | And create default cobrand class without all of Moose.
* Add Extra role to ease use of {extra} field.Hakim Cassimally2015-03-20-0/+193
| | | | | | | | | Historically, the extra field has been used in two different ways by different cobrands, both as a list (e.g. Open311 category fields) and a hash (e.g. the Zurich cobrand). This commit consolidates usage, adding an API to make use of the field easier and always returning a hash for the code to use. Fixes #1018.
* use moose role for is_from_abuser methodStruan Donald2011-05-26-0/+29