aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
Commit message (Collapse)AuthorAgeLines
* Do upload_dir check on start up, not each report.Matthew Somerville2017-03-15-1/+8
| | | | | If we're chugging through a list of reports, this save on a lot of pointless statting of the upload directory which we know is there.
* Add cobrand call_hook fn, calls a fn if defined.Matthew Somerville2017-02-15-1/+1
|
* In Edge 14, do all HTTP redirects in HTML instead.Matthew Somerville2017-01-17-0/+3
| | | | | This is to work around https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8572187/
* Update pagination when status/categories changed.Matthew Somerville2016-10-18-2/+10
|
* Allow multiple selections in report list filter.Zarino Zappia2016-10-13-4/+6
| | | | | | This lets people filter by multiple categories or states. It uses our jQuery multi-select plugin to turn the <select multiple>s into little overlay lists of checkboxes. HTML5 history is also supported.
* Include stash in render_fragment calls.Matthew Somerville2016-09-20-2/+1
|
* [fixmystreet.com] Add Content-Security-Policy.Matthew Somerville2016-08-16-1/+2
|
* Remove some unused code/ database handle.Matthew Somerville2016-08-12-3/+0
|
* Log failure to send email.Matthew Somerville2016-08-08-1/+2
|
* Add HTML email templates.Matthew Somerville2016-08-01-16/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* [UK Councils] Send correct confirm emails for updatesDave Arter2016-06-15-4/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* Use only one templating system for emails.Matthew Somerville2016-05-25-2/+1
| | | | | | | 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.
* Prevent dev sites auto-creating session.Matthew Somerville2016-04-06-4/+4
| | | | | We check for a session's existence before looking in it, as looking in it first would auto create a session.
* Refactor email handling to use Email::MIME alone.Matthew Somerville2016-03-30-24/+9
|
* Move get_photo_params to Utils::Photo.Matthew Somerville2015-12-02-36/+0
|
* Move EmailSend out of Catalyst for use elsewhere.Matthew Somerville2015-12-02-122/+3
|
* [Zurich] new status flagsHakim Cassimally2015-10-06-1/+2
| | | | | | | Have moved the generation of banner text from the template into problem_as_hashref See mysociety/FixMyStreet-Commercial#672
* Allow attachment of emails in email_sendHakim Cassimally2015-10-06-0/+46
| | | | Required by Zurich for mysociety/FixMyStreet-Commercial#675
* Fix handling From/To header in new Email::Simple.Matthew Somerville2015-10-06-16/+18
| | | | | | | Newer versions of Email::Simple (2.104+) treat arrayrefs in headers by fetching the first item only in scalar context. Our snapshot installs 2.102, so this shouldn't be an issue, but we might as well bypass Email::Simple for those headers.
* Remove remaining hardcoded site name from strings.Matthew Somerville2015-09-28-0/+2
| | | | Add a site_name template parameter available to all templates.
* Allow through reply-to header in send_email.Matthew Somerville2015-09-01-1/+1
| | | | This might be used now by e.g. the contact form.
* Add default sender to send_email_cron.Matthew Somerville2015-08-19-0/+7
| | | | | Matches send_email, remove unneeded setting of sender in one call, and add contact name to report sent email.
* Make sure get_param_list returns empty list if param is missingDave Arter2015-07-27-1/+2
| | | | | | If the specified parameter was missing from `$c->req->params`, a list of form `(undef)` would be returned. This commit makes it return an empty list if the parameter is missing.
* Factor out all uses of param()/params.Matthew Somerville2015-07-07-1/+48
| | | | | | | Use a central get_param and get_param_list functions dependent on whether we're after a scalar or a list (almost always a scalar). This prevents any possibility of confusion where param() could return a list, or params->{} an arrayref.
* Use config variable for setting proxy trust.Matthew Somerville2015-02-24-5/+5
| | | | | | Rather than hardcoding domain names, add a SECURE_PROXY_SSL_HEADER variable that provides a trusted HTTP header and value that can be used to determine if we're behind a HTTPS proxy.
* Move site_title function to site-name web templateMatthew Somerville2015-01-19-4/+4
| | | | | | | This matches the email template behaviour, and makes it much easier to override without requiring a cobrand package file. Fixes #979.
* Use same handling for cron and non-cron email.Matthew Somerville2015-01-13-11/+21
| | | | | This means that e.g. SMTP authentication is used when set up by all emails, not just non-cron ones. Fixes #988.
* Set DefaultLocale appropriately when language set.Matthew Somerville2014-12-10-4/+0
|
* Fix encoding of signature in emails.Matthew Somerville2014-12-10-0/+2
| | | | | This text was being imported encoded, which led to double-encoding when used in templates. Fixes #960 and #961.
* Update secure proxy list to include www.fixmystreet.com.Matthew Somerville2014-07-04-2/+5
|
* Merge branch '700-auto-emails'Matthew Somerville2014-05-16-10/+26
|\
| * Set site_name and signature email variables for alertsStruan Donald2014-05-16-10/+26
| | | | | | | | so we can include the name of the site non TT templated emails
* | [Bromley] Add secure-proxy line.Matthew Somerville2014-05-12-0/+1
|/
* Change default email indentation to none.Matthew Somerville2014-03-17-1/+2
| | | | | This is very old, no-one seems to want/need it any more, and more than one reuser does not want it. Fixes #715.
* Use config's EMAIL_DOMAIN in cron email Message-ID.Matthew Somerville2014-03-12-2/+2
| | | | Rather than hardcoded mysociety.org.
* More accurate config overriding for Zurich.Matthew Somerville2013-10-24-0/+8
|
* Check for abuse in more places.Matthew Somerville2013-06-19-0/+10
|
* Add Catalyst::Plugin::Compress::Gzip (locally, as CPAN version overloads ↵Matthew Somerville2013-03-19-0/+1
| | | | wrong function).
* Fix couple of issues with module upgrades.Matthew Somerville2013-03-15-1/+4
|
* Manually note secure-ness of site.Matthew Somerville2013-03-12-0/+7
|
* Allow email indent to be a cobrand parameter.Matthew Somerville2013-02-11-0/+1
|
* Don't fetch width/height for full size images.Matthew Somerville2013-02-07-4/+6
|
* Add hash as query parameter on photos so that rotating instantly works, no ↵Matthew Somerville2013-02-07-6/+15
| | | | cache issues (fixes a3).
* Merge remote branch 'origin/zurich'Matthew Somerville2013-02-04-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/open311-populate-service-list bin/send-comments bin/update-all-reports conf/crontab.ugly db/schema.sql perllib/FixMyStreet/App/Controller/Admin.pm perllib/FixMyStreet/App/Controller/Report/New.pm perllib/FixMyStreet/App/Controller/Reports.pm perllib/FixMyStreet/Cobrand/Default.pm perllib/FixMyStreet/Cobrand/LichfieldDC.pm perllib/FixMyStreet/DB/Result/Open311conf.pm perllib/FixMyStreet/DB/Result/Problem.pm perllib/FixMyStreet/DB/ResultSet/Problem.pm perllib/FixMyStreet/SendReport.pm perllib/FixMyStreet/SendReport/Email.pm perllib/FixMyStreet/SendReport/Open311.pm perllib/Open311/GetServiceRequestUpdates.pm perllib/Open311/PopulateServiceList.pm t/app/controller/report_new.t t/app/controller/rss.t templates/web/bromley/report/display.html templates/web/default/admin/council_contacts.html templates/web/default/common_header_tags.html templates/web/default/dashboard/index.html templates/web/default/front/stats.html templates/web/default/report/_main.html templates/web/default/report/update-form.html templates/web/emptyhomes/index.html templates/web/emptyhomes/report/display.html templates/web/emptyhomes/report/new/councils_text_all.html templates/web/emptyhomes/reports/body.html templates/web/emptyhomes/reports/index.html templates/web/fixmystreet/report/new/fill_in_details_form.html templates/web/fixmystreet/report/update-form.html web/cobrands/fixmystreet/fixmystreet.js web/js/fixmystreet.js
| * Add some Zurich banner tests.Matthew Somerville2013-01-23-0/+2
| |
| * Set DateTime locale for Zurich manually.Matthew Somerville2012-12-20-0/+3
| |
| * Allow unconfirmed as a visible state in Zurich, adjust front end list/item ↵Matthew Somerville2012-12-19-0/+4
| | | | | | | | templates to suit.
* | Add do-not-reply config variable, removing special case from code.Matthew Somerville2013-01-02-2/+1
|/
* Generalise hostname language overriding.Matthew Somerville2012-08-17-3/+3
|
* Get port for default mapit URL.Matthew Somerville2012-07-18-0/+2
|