aboutsummaryrefslogtreecommitdiffstats
path: root/t
Commit message (Collapse)AuthorAgeLines
...
* Automatically spot Open311 co-ord/ID attributes.Matthew Somerville2016-08-24-2/+69
|
* Remove Open311 endpoint to separate repo.Matthew Somerville2016-08-23-1327/+0
|
* Allow user to have an area assigned in adminDave Arter2016-08-22-240/+283
|
* Add user planned reports.Matthew Somerville2016-08-22-6/+95
| | | | | | 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.
* Allow user permissions to be granted/revoked in adminDave Arter2016-08-17-45/+324
|
* Restrict user editing in adminDave Arter2016-08-17-0/+24
| | | | | | | | The 'user_edit' permission is required to edit users. The admin pages on UK council cobrands only allow editing of users whose from_body is the same as the logged-in user, or who have sent reports or updates to the council.
* Require 'report_edit' permission for editing reports in adminDave Arter2016-08-17-0/+47
|
* Shrink test sample photo.Matthew Somerville2016-08-16-5/+5
|
* Direct report moderated emails correctly.Matthew Somerville2016-08-10-5/+9
|
* Merge branch 'issues/forcouncils/10-report-as-dropdown'Matthew Somerville2016-08-10-0/+194
|\
| * Feature to create report as body/other user.Zarino Zappia2016-08-10-0/+194
| | | | | | | | | | | | | | | | | | | | | | | | This allows users who have the correct permissions to add reports on behalf of the body or another user. We enable editing of the email box by default, so that if JavaScript isn't available, someone can still change the email for the 'another user' option. For mysociety/fixmystreetforcouncils#10 and mysociety/fixmystreetforcouncils#11
* | [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-168/+195
| | | | | | | | | | | | | | | | | | | | | | | | 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".
* Refactor map pin/feature functions.Matthew Somerville2016-07-21-5/+5
|
* Use improved TestMech::create_user_ok instead of User::find_or_createDave Arter2016-07-19-128/+44
| | | | | This improves create_user_ok to work more like create_body_ok where extra params can be passed in and set on the model.
* Restrict add/editing of bodies in admin to superusersDave Arter2016-07-19-1/+1
|
* [UK Councils] Council users can only see their own council's adminDave Arter2016-07-19-9/+43
|
* Use normal user authentication to control access to /adminMatthew Somerville2016-07-19-0/+80
| | | | | | | | | - Adds is_superuser flag to User - Logged-in user must be a superuser or have from_body set in order to access anything within /admin - has_permission_to on a superuser will always return true - Only superusers can create/grant superusers - New `createsuperuser` command for creating superusers
* Merge branch '400-editing-category'Matthew Somerville2016-07-15-1/+2
|\
| * Allow editing of category on admin report edit.Matthew Somerville2016-07-15-1/+2
| | | | | | | | This also updates the body column to match the category.
* | Stop using collapse filter in category template.Matthew Somerville2016-07-15-1/+1
|/ | | | | | If a category had eg. a double space, the use of the filter meant it was output in the HTML with only a single space and so woudn't match the database entry. Switch to more explicit template space chomping.
* Add two-tier responsibility note to confirm emailDave Arter2016-07-08-0/+7
|
* Refactor sending of problem confirmation emailDave Arter2016-07-08-0/+38
| | | | | | | | Replaced duplicate code blocks that are responsible for sending confirmation of problem email with a function. Should make it easier to do two-tier conditional messages later on. Also fixes a minor bug where the wrong confirmation email would be sent for reports from the mobile app to unresponsive councils.
* Stub out calls to Gaze when running testsDave Arter2016-07-08-1/+1
| | | | The tests were running slowly because of gaze.mysociety.org's rate-limiting.
* Fix CSRF issue with new login during process.Matthew Somerville2016-07-05-0/+1
| | | | | | If you had no session cookie, started reporting a problem, logged in through that process, you would then get a CSRF error as the token had been created before the session was.
* Make sure map JS works through an admin proxy.Matthew Somerville2016-07-04-1/+1
| | | | | Tidy up use of absolute URLs when in the admin. Have the 404 handler spot static files in admin as a fallback.
* Merge branch '1347-fold-back-zurich'Matthew Somerville2016-06-29-27/+19
|\
| * Add external field editing to admin report edit.Matthew Somerville2016-06-29-20/+12
| | | | | | | | Show bodies for which details are missing, and any send method used.
| * Tidy up some UK specific easting/northing handlingMatthew Somerville2016-06-22-7/+7
| |
* | Use valid orientation flag for test imageDave Arter2016-06-27-5/+5
|/ | | | | | 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.
* Allow admin to edit user's phone number.Matthew Somerville2016-06-22-0/+5
|
* Merge branch '360-change-email'Matthew Somerville2016-06-20-122/+120
|\
| * Allow users to update their email address.Matthew Somerville2016-06-20-3/+51
| |
| * Improve CSRF tokens and add to more forms.Matthew Somerville2016-06-20-119/+69
| |
* | Fix check for old-style parsed XML.Dave Arter2016-06-16-0/+8
| | | | | | | | | | It errored on new-style parsed XML, rather than let it through. Add a new category to the test that highlights this.
* | Merge branch 'open311-improvements'Matthew Somerville2016-06-15-14/+3
|\ \
| * | Tidy up Open311 XML handling.Matthew Somerville2016-06-15-14/+3
| |/ | | | | | | | | Parse the XML in such a way other parts of the code do not have to worry about single-value folding or the like.
* / [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.
* Strip line end spaces in emails.Matthew Somerville2016-06-07-2/+2
|
* Stop using Text::Wrap to wrap email bodies.Matthew Somerville2016-06-07-15/+15
| | | | | | | | | | | 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.
* Fix broken test due to missing config override.Matthew Somerville2016-05-27-2/+7
|
* Use only one templating system for emails.Matthew Somerville2016-05-25-2/+2
| | | | | | | Historically, emails sent offline (alerts, questionnaires, etc) used a different templating system from those sent by the website (e.g. login emails), though the newer system was also being used for the site name and signature of offline emails.
* Fallback if request to Gaze fails.Matthew Somerville2016-05-18-6/+5
| | | | Fixes #1286.
* Skip fetched updates if they're out of date range.Matthew Somerville2016-04-26-6/+7
| | | | | Even when we ask for a specific range of dates, we sometimes get given more in the response.
* Merge branch '1383-remove-dead-projects'Matthew Somerville2016-04-22-262/+60
|\
| * Update tests for cobrand/template changes.Matthew Somerville2016-04-20-111/+60
| |
| * 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
| |