aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
Commit message (Collapse)AuthorAgeLines
* [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
|
* Move test mocks to their own directory.Matthew Somerville2016-01-27-2/+2
|
* Fix cobrand restriction of My/Nearby.Matthew Somerville2015-12-15-6/+62
| | | | | | | | | | | | 5c79337 simplified a bit too far, as after then a particular cobrand could in Nearby and My only filter reports to a particular body, not any other criteria. To fix this, introduce more generic functions in the default cobrand to allow more flexibility. Make sure a few tests delete their bodies fully so that new tests pass when run as part of the suite. Fixes #1289.
* Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-30/+27
| | | | Command line scripts don't need a full blown app, just database.
* [Zurich] Set report's public response before sending email to userDave Arter2015-10-06-2/+36
| | | | | | | | The 'public response' to a problem was being omitted from the email sent to the user when the problem is closed, because the email was sent before the report's 'extra' field was updated with the response body text. This commit sets the public response on the problem before sending the email.
* [Zurich] Test that external message is visible for certain statesDave Arter2015-10-06-6/+6
|
* [Zurich] Override MAP_TYPE in tests where appropriateDave Arter2015-10-06-0/+20
|
* [Zurich] Tweaks to redirectHakim Cassimally2015-10-06-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See mysociety/FixMyStreet-Commercial#690 I understand redirection to summary page was introduced at ZWN's request, to make it easy to process reports and then quickly move onto the next one. However, during testing now, Tobias has mentioned this is a) slowing things down and b) confusing because it's not obvious that the report has been saved. I've tried to address (b) by adding the "Aktualisiert!" message when you are redirected. Also, for (a) I've removed the redirection from a few cases, and disabled it for superuser. If need be, I can remove redirection from more (or all) cases. Fix Official answer/Reply to user - hide label for status update on state change - correct wording on button for closure (single wording) - correct wording on label for user reply (either "Official answer" or "Reply to user" as appropriate) - Make sure the official response texts are shown for edit/static as appropriate, and test. - javascript improvements - honour public status update for Extern/Wunsch too - don't show public message for Wunsch - Ignore all other fields when rotating photos. (See mysociety/FixMyStreet-Commercial#718)
* [Zurich] additional closure statuses workHakim Cassimally2015-10-06-96/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requirements: ============= 1: DM to be able to mark a problem as Wish, Extern, Not contactable, Hidden, Jurisdiction unknown 2: SDM to be able to mark a problem as Not contactable. 3: DM to be able to add information to such a problem, and trigger emails to external agencies, and to user, closing the problem at the same time. 4: Closed reports must be categorized as Wish/Extern/NC/Hidden/JU for statistical reporting 5: Non-closed reports must appear as open, to allow DM to see them in the list, similar to what is currently done for Ruckmeldung Ausstehend (Feedback outstanding). 5b: however "Hidden" problems must be immediately hidden from public view. Proposal: ========= a) Requirement 1 will be carried out in exactly the same way by DM. e.g. Category dropdown select b) Requirement 2 will be carried out in exactly the same way by SDM. e.g. "Not contactable" button c) BUT, for a), c), the category will be diverted to "Ruckmeldung Ausstehend" (Feedback outstanding), and metadata will be saved with the appropriate closure type. d) NOTE: this means the report will still be visible to public as "In bearbeitung" (Except for Hidden reports, as per 5b) e) The extra fields will be presented on the "Ruckmeldung Ausstehend" page, just as defined in the PDF, depending on the metadata. e.g. - Wish: Zustaendige Stelle + Message - Extern: External body + Message2 - Not contactable: (no extra info) - Hidden: (no extra info) - Jurisdiction unknown: (no extra info) f) When the DM publishes the answer (e.g. "Antwort Veroeffentlichen" button), the state will normally change to Fixed. BUT in the new cases, the metadata saved in step c) will be checked, and the report will change state to Wish/Extern/Not contactable/Hidden/Jurisdiction unknown, as appropriate. The report will now be visible/hidden as previously discussed depending on the new state. g) If the report is edited again (in /admin/report_edit) it will be in the relevant state, and any extra fields will be visible as per e). Those fields may be updated. Alternatively, the state may be changed, possibly triggering a) again, and clearing any metadata. - Fix javascript interactions 690 - show new statuses in summary - fix photos on SDM page - fix Planned => Planned+metadata transition - stop "assignation .select" js affecting templates - fix redirection for Extern and generally See mysociety/FixMyStreet-Commercial#672, mysociety/FixMyStreet-Commercial#690
* [Zurich] Updated email templatesMatthew Somerville2015-10-06-14/+3
| | | | | | | - submit-external-wish.txt includes a link with report's coordinates, template values are interpolated Conflicts: perllib/FixMyStreet/SendReport/Zurich.pm
* [Zurich] admin workflow changes available statesHakim Cassimally2015-10-06-110/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | See mysociety/FixMyStreet-Commercial#690 - external_message for Extern/Wunsch states - as per PDF mockups, the "public response" field is now editable from more states, namely: - Ruckmeldung ausstehend - Extern - Zustandigkeit unbekannt - Wunsch - Nicht kontaktierbar - Unsichtbar - test fixes NB: slight hack to reorder Zurich report_display tests As these remove 'investigating' from hidden_states, these break tests for default cobrand (the FMS::App code expects to be called once on request start, not multiple times within one test) - Not contactable button and tests for this and the similar `send_back` functionality (previously untested). NB: Unsure why we need to specify form_number=2 just for these submits, but test won't find the buttons otherwise. - Make sure SDMs' "time_spent" figure is recorded. (See mysociety/FixMyStreet-Commercial#718)
* Add "time spent" admin logging.Hakim Cassimally2015-10-06-2/+20
| | | | | | | | | | | | | | | | | | | | | Mechanism is general, but current implementation only used for Zurich. - Zurich: Record time_spent field mysociety/FixMyStreet-Commercial#676 - template changes (including jQuery spinner) - backend changes to save data are made: - in log_edit, if supplied - and time on category change (and arbitrary actions) - Add update_admin_log to all paths for DM, ensuring that it gets called, while resetting the `time_spent` parameter, to make sure that there is never a duplicate record created. - Also quell warning about using DateTime values in query. - Also add (seemingly unrelated) parens to stop misparsing of OK line in questionnaire test now that DT::Format::Pg is used in Zurich cobrand See mysociety/FixMyStreet-Commercial#676
* [Zurich] Attach images to external bodyHakim Cassimally2015-10-06-1/+103
| | | | See mysociety/FixMyStreet-Commercial#675
* [Zurich] 'photo required' functionalityDave Arter2015-10-06-0/+36
| | | | | | | | | | | - Save 'photo_required' value in Contact->extra from admin edit form - Enforce per-category photo requirement on new reports A new step has been added to the photo upload process that ensures a photo is present if any of the categories chosen for the report require it. If the photo is missing an error is displayed to the user in the same manner as if the photo upload was invalid. - Add test of mandatory photo categories
* Add support for multiple photos per report.Hakim Cassimally2015-10-06-3/+15
| | | | | | | | 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.
* [Zurich] all admin users can see statsHakim Cassimally2015-10-06-2/+2
| | | | | | | Admin CR4 https://github.com/mysociety/FixMyStreet-Commercial/issues/673 seems like admin_pages should be able to generate the menu, but this change also needs template change.
* Simplify/consolidate body restriction db code.Matthew Somerville2015-08-19-9/+8
| | | | | | | Make dashboard work properly in two-tier councils, showing reports sent to both. Create an index on the array of the bodies_str column to speed up performance, and use that throughout the code replacing all LIKE scans. This also enables a simplifying tidy of the restriction code.
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-1/+1
| | | | | This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
* [Oxfordshire] Add status/category filtering to map pagesDave Arter2015-07-23-0/+50
|
* [Zurich] add columns to stats exportHakim Cassimally2015-03-31-1/+1
| | | | | | | | | | | | | | | - Original Report description - Amended Report description (unsure what this is) - Media URL (currently one picture, in the future 1-3 pictures) - Interface used (see open311) - Requested datetime (see open311) (seems to be same as created) - Agency sent datetime (see open311) - Updated datetime (see open311) - Council-Response - title as per https://github.com/mysociety/FixMyStreet-Commercial/issues/678
* Add Extra role to ease use of {extra} field.Hakim Cassimally2015-03-20-3/+26
| | | | | | | | | 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.