aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
Commit message (Collapse)AuthorAgeLines
* [Oxfordshire] Use local time for rdi_processed, not UTCDave Arter2017-09-13-2/+10
|
* Merge branch '1836-slash-category-bug'Matthew Somerville2017-09-11-0/+1
|\
| * Fix issue editing category with '/' in it.Matthew Somerville2017-09-11-0/+1
| | | | | | | | | | | | Simplify chaining of body/category admin URLs so that all categories are treated the same, with `/` or without, and the template will then always have its CSRF token.
* | [Oxfordshire] Log when problems sent by RDI email.Dave Arter2017-09-11-1/+32
| | | | | | | | | | | | | | | | The timestamp of when a problem was included in an RDI is shown on the problem’s inspector form. Also check back and include any inspected reports that for some reason haven't been instructed yet. Fixes mysociety/fixmystreetforcouncils#223.
* | [Oxfordshire] tests for response time messagesStruan Donald2017-09-11-0/+51
|/
* Remove hardcoded states from templates.Matthew Somerville2017-08-31-2/+2
| | | | | | | | | | | State display names are now got from the database wherever they are displayed, including admin dropdowns, list filters, and update meta statements. This also covers the open/closed/fixed 'groups'. This also fixes a bug whereby if e.g. an update has problem_state investigating, the next update has no problem_state, and the last update has investigating again, it was previously showing a state change to investigating on that third update.
* Make sure gettext domain specified in all tests.Matthew Somerville2017-08-25-6/+0
|
* [Bristol] Fix 500 error on /report/newDave Arter2017-08-21-0/+44
|
* [Zurich] Bring all reports in line with upstream.Matthew Somerville2017-08-18-6/+8
| | | | | Update the map/list if the map is zoomed/panned, and make sure the updated HTML list is returned.
* [Oxfordshire] Put I when single char activity codeMatthew Somerville2017-08-02-4/+19
| | | | | The "M" line needs an "I" after the activity code if the activity code is only one character.
* [Oxfordshire] RDI file should show all inspections as happening on the same dateDave Arter2017-07-24-2/+2
| | | | Fixes mysociety/fixmystreetforcouncils#203
* Add inactive state to categories.Matthew Somerville2017-07-14-2/+1
| | | | | A new 'state' column replaces confirmed and deleted, allowing categories to be unconfirmed, confirmed, deleted or inactive.
* [Oxfordshire] Group RDI output by activity code.Matthew Somerville2017-07-06-11/+32
|
* Run each test file in a transaction.Matthew Somerville2017-06-20-29/+3
| | | | This means that the tests can be run in parallel.
* [UK] Remove requirement for fixed body IDs.Matthew Somerville2017-06-20-4/+4
| | | | | | | | | | | | Historically in UK cobrands, bodies have had IDs the same as the MapIt area ID they cover. This can be confusing (if you are setting up a dev environment, say) and should not be necessary. This commit removes the requirement entirely, by switching any ID checks to either the name of the body, or the actual area it covers. One note: the body name in the test has to match so that we do not get two bodies both covering 2237 created. This will not be necessary when the tests are compartmentalized in the next commit.
* Auto-add strict/warnings/Test::More with TestMech.Matthew Somerville2017-05-31-40/+3
|
* Fix test that would not run offline.Matthew Somerville2017-05-25-2/+1
| | | | | Switch it to use our mock MapIt. Also remove other unused overrides to external services.
* [UK] Stop nearest request with scientific notationMatthew Somerville2017-05-18-16/+15
| | | | | | If the longitude was very close to 0, it was being sent as e.g. 1e-6 in the request to MapIt. Mock out the Bing query so that this can be tested (the closest.t tests were previously always being skipped).
* [Oxfordshire] Send RDI reports by email.Matthew Somerville2017-05-16-6/+56
|
* Tidy up find_closest* functions.Matthew Somerville2017-05-02-3/+3
| | | | | Allow find_closest to be called multiple times with only one lookup, and to return just its data, not a compiled string.
* [SeeSomething] Remove cobrand.Matthew Somerville2017-03-31-87/+0
|
* Make sure all MapIt tests can run offline.Matthew Somerville2017-03-23-1/+6
|
* Always include MapIt mock handler in all tests.Matthew Somerville2017-03-23-7/+1
|
* Use sender in From if From and To domains match.Matthew Somerville2017-03-14-5/+5
| | | | | | 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
* [Oxfordshire] Add Exor RDI file download featureDave Arter2017-02-15-0/+23
| | | | | | | | | | The RDI file format encapsulates information about inspections that have taken place, and can be uploaded into Exor to create defects in bulk. This commit adds a page to the Oxfordshire cobrand's admin allowing RDI files to be generated and downloaded from FMS. For mysociety/fixmystreetforcouncils#127
* Move staging flags to their own config variable.Matthew Somerville2017-01-10-3/+3
|
* [Zurich] Fix 500 error when editing superusersDave Arter2016-12-06-1/+14
| | | | | | | | | | | | The Zurich::admin_type function was setting $c->stash->{body}, meaning that when trying to edit a superuser the 'fetch_contacts' function wasn't being called, causing an "Can't call method "all" on an undefined value" error as $c->stash->{live_contacts} wasn't ever being set. Fixed by changing the conditional to simply determine whether fetch_contacts needs to be called. Included a regression test that meant a small addition to the MapItZurich mock.
* Error if logged-in user visits admin without permission.Matthew Somerville2016-10-26-4/+4
| | | | | This is less confusing than redirecting to /auth and then to /my (as they're logged in). Fixes #1566.
* Add .btn and .form-control classes to inputsZarino Zappia2016-10-04-1/+1
|
* Factor out contains_or_lacks test function.Matthew Somerville2016-09-29-13/+2
|
* New .form-control class for simpler input stylingZarino Zappia2016-09-20-2/+2
| | | | | | | | | | | Form input styling is mostly left up to the browser default now. A custom border, drop-shadow, and border-radius can be applied by adding the `.form-control` class, which standardizes the appearance of inputs, selects, and textareas. The core reporting form, authentication forms, local alert forms, contact form, and questionnaire form have all been updated to use the new `.form-control` class.
* Add ‘Inspection required’ field to categoriesDave Arter2016-09-09-2/+2
| | | | | | | | | | | Categories can now require reports to be marked as 'inspected' via the frontend before they're sent by send-reports. A side-effect here is that send-reports will perform an extra n queries for each report, where n is the number of bodies that report is being sent to, but hopefully in practice this won't matter as it's an offline cronjob. See mysociety/fixmystreetforcouncils#50
* Automatically spot Open311 co-ord/ID attributes.Matthew Somerville2016-08-24-2/+19
|
* [Zurich] Add areas in test reports to fix warning.Matthew Somerville2016-08-09-0/+3
|
* [East Sussex] Remove East Sussex cobrandDave Arter2016-08-02-1/+0
|
* Add HTML email templates.Matthew Somerville2016-08-01-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* [Zurich] Send admin emails from the do-not-reply addressDave Arter2016-07-28-1/+1
| | | | | Also takes the opportunity to fix the incorrectly-encoded sender name which was appearing to some clients as "Züri Wie Neu".
* Restrict add/editing of bodies in admin to superusersDave Arter2016-07-19-1/+1
|
* Merge branch '360-change-email'Matthew Somerville2016-06-20-8/+3
|\
| * Improve CSRF tokens and add to more forms.Matthew Somerville2016-06-20-8/+3
| |
* | [UK Councils] Send correct confirm emails for updatesDave Arter2016-06-15-1/+61
|/ | | | | | | | | | | | | | | | | | | | | | Some UK councils with Open311 integrations (e.g. Bromley) have a custom wording in the confirmation email sent when updates are left on reports, to make the user aware that the update is sent to the council in question. Bromley noticed that some emails were being sent without this wording, leading at least one user to contact the council directly about the report. It turns out that although the email template contains an IF clause to use the appropriate wording for Bromley (and Stevenage) reports, the incorrect template file was being used when updates were made via the Bromley cobrand. This commit solves the problem by introducing a new `Cobrand::Default::path_to_email_templates` method, which is overridden by `Cobrand::UKCouncils` to include the `templates/email/fixmystreet` path. Paths returned by this method are used as the `additional_template_paths` param when templating emails. A regression test is included. Additionally moves email templates for fixmystreet.com to a directory name reflecting their purpose, in the same way the web templates are arranged.
* Stop using Text::Wrap to wrap email bodies.Matthew Somerville2016-06-07-1/+1
| | | | | | | | | | | If we don't do this, the default quoted-printable encoding will make sure the lines are physically wrapped anyway. format=flowed could be an alternative, but I think "=" acting as a quasi-hyphen is somewhat nicer than every line ending with "=20". A better solution could be quoted-printable doing soft wrapping only at word breaks, making each line be readable though end with a " =", but that didn't seem worth the effort involved.
* Update tests for cobrand/template changes.Matthew Somerville2016-04-20-15/+15
|
* Remove final web/fixmystreet templates.Matthew Somerville2016-04-20-1/+0
| | | | And associated, e.g. nothing references fixmystreet-old-box.js any more.
* Remove some unused cobrands.Matthew Somerville2016-04-20-150/+0
|
* Refactor email handling to use Email::MIME alone.Matthew Somerville2016-03-30-45/+43
|
* Allow zurich tests to run without network.Matthew Somerville2016-03-23-11/+15
|
* Updates to cpanfile and code for perl 5.20/5.22.Matthew Somerville2016-03-23-7/+19
| | | | | | | | | | | | | | | | | | | | The following modules had bugs that have been fixed for working in recent perls: * List::MoreUtils * Guard * PadWalker * aliased * URI * Convert::NLS_DATE_FORMAT The CGI module was removed from core in 5.20, so include it in the snapshot (I don't think it's actually used, but is a dependency). "{" needs to be escaped in regular expressions, and ~~ should not be used. Fix some tests that expect e.g. a certain hash ordering, to use sorted output or better comparisons.
* Add cobrand-specific custom reporting fields.Matthew Somerville2016-03-09-0/+85
| | | | | | This adds a new cobrand variable, report_form_extras, which contains a list of extra fields that will be saved in the 'extra' metadata of the report. Fields may optionally be marked as required.
* Switch final few JSON uses to JSON::MaybeXS.Matthew Somerville2016-02-09-2/+0
|