aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model
Commit message (Collapse)AuthorAgeLines
* Merge branch 'offline-tests'Matthew Somerville2017-03-28-5/+5
|\
| * Make sure all MapIt tests can run offline.Matthew Somerville2017-03-23-5/+5
| |
* | Add customisable defect types.Dave Arter2017-03-23-0/+67
|/ | | | | | | | | Problems can have an associated defect type, that can be assigned during an inspection. Include an admin interface for managing these types, that can also be assigned on a per-category basis, currently available to the Oxfordshire cobrand. (Also include 'TM' in traffic management Exor RDI output.)
* Use sender in From if From and To domains match.Matthew Somerville2017-03-14-5/+13
| | | | | | To deal with a recipient mail server not allowing inbound email using the same domain as an internal domain, e.g. https://community.mimecast.com/docs/DOC-1419
* Add is_in_progress Problem helper.Matthew Somerville2017-03-10-0/+16
|
* [Oxfordshire] Use 'days ago' format on problem listspezholio2017-02-27-1/+14
| | | | Fixes mysociety/fixmystreetforcouncils#98
* Add Problem->tokenised_url for logging user inpezholio2017-02-15-2/+29
| | | | | | This method creates a token that logs the reporting user in, optionally with some parameters which are stored with the token for use when redirecting after login.
* Add Problem->time_ago for pretty-printed durationpezholio2017-02-15-0/+44
|
* If a problem has duplicates, display them on its detail pageDave Arter2016-12-13-0/+11
|
* Fix list of response templates for a problem.Matthew Somerville2016-10-20-0/+14
| | | | | Instead of returning all templates for the problem's body, return those for the problem's category (or with no category).
* Adding report to shortlist removes from others.Matthew Somerville2016-10-11-0/+14
|
* Fix bug in fetching existing shortlisted report.Matthew Somerville2016-10-11-0/+4
| | | | | It would always create a new report rather than return an existing one, if present.
* Improve display of category extra data in admin.Matthew Somerville2016-09-09-4/+4
| | | | Allow get_extra_metadata to return all the data with no argument.
* Add user planned reports.Matthew Somerville2016-08-22-0/+34
| | | | | | A user with the appropriate permission can add/remove reports from their list of planned reports using a button on a report page. The list can be viewed at /my/planned.
* Shrink test sample photo.Matthew Somerville2016-08-16-1/+1
|
* Add HTML email templates.Matthew Somerville2016-08-01-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | Design is all Zarino. This adds the ability to send HTML emails, including attached inline images. When included, this is done as a multipart/related email containing a multipart/alternative (of plain and HTML) and any attached images, so that the images are available even if HTML mail is not. The alert emails list data has been improved so it can be constructed in the templates rather than the code. Various templates have been tidied. Various workarounds for email clients have been made, including: * <th> is used so that the Android 4.x mail client can give them `block` styling in the small screen media query. * Font settings defined on every table cell (<th>) so that sans-serif fonts are used in Outlook, rather than Times New Roman. * A three-column wrapper table to create a 620px centred content area that also shrinks down on narrow screens. (Outlook doesn’t like max-width, so this is the simplest alternative.) * Enforcing a sensible (500px) min-width for the main content area, on clients that don’t support media queries (eg: native Gmail app). * Giant borders on buttons so Outlook displays them * Image alignment with align rather than float.
* Merge branch '1347-fold-back-zurich'Matthew Somerville2016-06-29-6/+6
|\
| * Tidy up some UK specific easting/northing handlingMatthew Somerville2016-06-22-6/+6
| |
* | Use valid orientation flag for test imageDave Arter2016-06-27-1/+1
|/ | | | | | jhead 3.00 considers 0 an invalid value for EXIF orientation and will replace it with 1 when run with the -autorot flag. This was causing a test failure as the SHA hash of the sample image was being changed.
* Update tests for cobrand/template changes.Matthew Somerville2016-04-20-1/+1
|
* Add PNG image support.Matthew Somerville2016-04-08-1/+1
| | | | | | | Store image type along with hash in photo column, and use that when outputting images / generating URLs. Make sure all public photo URL generation goes through appropriate functions, and change temp URLs so the filename can be output directly from the list.
* Refactor email handling to use Email::MIME alone.Matthew Somerville2016-03-30-1/+1
|
* Remember user's last anonymous state.Matthew Somerville2016-03-04-0/+61
| | | | | If a user is logged in, use their last report/update to set the default anonymity state.
* Remove unnecessary shebang lines.Matthew Somerville2016-01-22-8/+0
|
* Remove risk of infinite loop in PhotoSet.Matthew Somerville2015-12-16-2/+2
| | | | | | Use a separate attribute for data direct from a database row when creating a PhotoSet, so that data will always contain one or more photo IDs.
* Remove many uses of mySociety::Config.Matthew Somerville2015-12-02-3/+3
|
* Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-66/+69
| | | | Command line scripts don't need a full blown app, just database.
* Add support for multiple photos per report.Hakim Cassimally2015-10-06-0/+76
| | | | | | | | For Zurich, see mysociety/FixMyStreet-Commercial#664. This commit includes a new PhotoSet class (NB: called Model:: though not really a model), should handle binary data (e.g. old style photos in database), fileids (40-char hash), and Catalyst::Upload objects.
* Move "missing" handling to separate column.Matthew Somerville2015-08-19-1/+3
|
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-76/+20
| | | | | This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
* Move Latin-char-specific name check to cobrand.Matthew Somerville2015-07-31-24/+0
| | | | | Also move some UK-specific code in the same function. The specific code is still tested in report_new.t.
* Alter token logging in and timeout behaviour.Matthew Somerville2015-07-10-1/+1
| | | | | | | Restrict email_sign_in token to one day, unused confirmation tokens to one month. Used tokens will redirect to the created thing but not log in; don't log in with alert links (unsubscribe link never expires, reply link will still show "reopen" tickbox).
* Add hidden_states and updating functions.Hakim Cassimally2015-06-16-0/+17
| | | | To allow visible/hidden states to be manipulated at runtime.
* Add Extra role to ease use of {extra} field.Hakim Cassimally2015-03-20-0/+111
| | | | | | | | | 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.
* [fixmystreet.com] Remove special NI code.Matthew Somerville2015-03-16-7/+12
| | | | | This is now handled by normal bodies in the admin. In order to remove references in send_reports, tidy up (unused) EmptyHomes code a bit.
* Factor out test contact creation to function.Matthew Somerville2015-03-13-20/+7
|
* [UK] Output NI grid references to NI councils.Matthew Somerville2015-02-20-2/+10
|
* Use same handling for cron and non-cron email.Matthew Somerville2015-01-13-1/+1
| | | | | This means that e.g. SMTP authentication is used when set up by all emails, not just non-cron ones. Fixes #988.
* By default, use area-based alerts.Matthew Somerville2014-12-12-30/+32
| | | | | | | | | The body-based alert only works if the body ID matches the MapIt ID. This fixes #959. Further work needs to be done to enable proper body-based alerts that work properly in all circumstances. Consequently, factor out fixed body IDs from many tests. Also fix a couple of tests not overriding geocoder correctly.
* Tests for moderationHakim Cassimally2014-08-14-0/+66
|
* Removal old Southampton/Reading/Lichfield cobrands.Matthew Somerville2014-07-29-19/+19
|
* Update all email templates with new text.Myfanwy Nixon2014-05-16-2/+2
| | | | And FixMyStreet.com specific open questionnaire page.
* Update old-style open311 script to use bodies.Matthew Somerville2014-04-07-23/+13
| | | | Add some comments to the top of the open311 bin scripts.
* Make sure language is set early enough in email alert loop.Matthew Somerville2014-02-26-0/+25
| | | | | The call to set_lang_and_domain needs to happen before the first string is translated (the report state).
* Make sure bodies returned in consistent order.Matthew Somerville2014-02-25-2/+2
|
* Make alert_type.t test more robust.Matthew Somerville2014-02-24-4/+8
| | | | | | Put alerts in default cobrand, so changes to other cobrand email templates don't affect the test; and clean up at the end of the test so that it can be rerun without issue.
* Tests for contact with comma seperated multiple emailsStruan Donald2013-11-04-0/+46
|
* Fix test suite to run regardless of config setup.Matthew Somerville2013-10-24-9/+27
|
* switch to Sub::Override from Test::MockModuleStruan Donald2013-09-12-6/+7
| | | | | This is for consistency as Sub::Override is used for another test and also so we minimise the number of modules installed just for testing
* explicitly set bodies_str for abuse and app store testsStruan Donald2013-09-12-0/+2
| | | | | | | | The first email count test in the abuse subtest was failing on Travis but not on my machine because the sent email alert test was running on my machine, as it has the mock module installed, and this was resetting the bodies_str to one with a confirmed contact. Setting bodies_str on both these tests stops this sort of thing happening again