diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/TfL.pm | 31 | ||||
-rw-r--r-- | perllib/FixMyStreet/Template.pm | 2 | ||||
-rw-r--r-- | templates/web/northamptonshire/index-steps.html | 4 | ||||
-rw-r--r-- | web/cobrands/tfl/assets.js | 1 |
5 files changed, 26 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml index d909b8962..970f80298 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,7 @@ addons: install: - .travis/install - 'if [ "$COVERAGE_PART" != "0" ]; then cpanm --quiet --notest Devel::Cover::Report::Codecov; fi' - - 'if [ "$CYPRESS" = "1" ]; then npm install cypress; fi' + - 'if [ "$CYPRESS" = "1" ]; then npm install cypress@3.8.3; fi' before_script: - commonlib/bin/gettext-makemo FixMyStreet - 'if [ "$COVERAGE_PART" != "0" ]; then export HARNESS_PERL_SWITCHES="-MDevel::Cover=+ignore,local/lib/perl5,commonlib,perllib/Catalyst/[^A],perllib/Email,^t"; fi' diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm index 320f35991..5c08cb540 100644 --- a/perllib/FixMyStreet/Cobrand/TfL.pm +++ b/perllib/FixMyStreet/Cobrand/TfL.pm @@ -446,19 +446,22 @@ sub munge_red_route_categories { my ($self, $contacts) = @_; if ( $self->report_new_is_on_tlrn ) { # We're on a red route - only send TfL categories (except the disabled - # one that directs the user to borough for street cleaning) and borough - # street cleaning categories. + # ones that direct the user to borough for street cleaning & flytipping) + # and borough street cleaning/flytipping categories. my %cleaning_cats = map { $_ => 1 } @{ $self->_cleaning_categories }; + my %council_cats = map { $_ => 1 } @{ $self->_tfl_council_categories }; @$contacts = grep { - ( $_->body->name eq 'TfL' && $_->category ne $self->_tfl_council_category ) + ( $_->body->name eq 'TfL' && !$council_cats{$_->category} ) || $cleaning_cats{$_->category} || @{ mySociety::ArrayUtils::intersection( $self->_cleaning_groups, $_->groups ) } } @$contacts; } else { # We're not on a red route - send all categories except - # TfL red-route-only and the TfL street cleaning. - my %tlrn_cats = map { $_ => 1 } @{ $self->_tlrn_categories }; - $tlrn_cats{$self->_tfl_council_category} = 1; + # TfL red-route-only and the TfL street cleaning & flytipping. + my %tlrn_cats = ( + map { $_ => 1 } @{ $self->_tlrn_categories }, + map { $_ => 1 } @{ $self->_tfl_council_categories }, + ); @$contacts = grep { !( $_->body->name eq 'TfL' && $tlrn_cats{$_->category } ) } @$contacts; } } @@ -472,7 +475,6 @@ sub _tlrn_categories { [ "Debris in the carriageway", "Fallen Tree", "Flooding", - "Flytipping (TfL)", "Graffiti / Flyposting (non-offensive)", "Graffiti / Flyposting (offensive)", "Graffiti / Flyposting on street light (non-offensive)", @@ -502,18 +504,29 @@ sub _tlrn_categories { [ sub _cleaning_categories { [ 'Street cleaning', 'Street Cleaning', + 'Street cleaning and litter', 'Accumulated Litter', 'Street Cleaning Enquiry', 'Street Cleansing', + 'Flytipping', + 'Fly tipping', + 'Fly Tipping', + 'Fly-tipping', + 'Fly-Tipping', + 'Fly tipping - Enforcement Request', ] } -sub _cleaning_groups { [ 'Street cleaning' ] } +sub _cleaning_groups { [ 'Street cleaning', 'Fly-tipping' ] } -sub _tfl_council_category { 'General Litter / Rubbish Collection' } +sub _tfl_council_categories { [ + 'General Litter / Rubbish Collection', + 'Flytipping (TfL)', +] } sub _tfl_no_resend_categories { [ 'Countdown - not working', 'General Litter / Rubbish Collection', + 'Flytipping (TfL)', 'Other (TfL)', 'Timings', ] } diff --git a/perllib/FixMyStreet/Template.pm b/perllib/FixMyStreet/Template.pm index fb63071c3..fbd51dcb7 100644 --- a/perllib/FixMyStreet/Template.pm +++ b/perllib/FixMyStreet/Template.pm @@ -155,7 +155,7 @@ sub sanitize { my $scrubber = HTML::Scrubber->new( rules => [ %allowed_tags, - a => { href => qr{^(http|/|tel)}i, style => 1, target => qr/^_blank$/, title => 1 }, + a => { href => qr{^(http|/|tel)}i, style => 1, target => qr/^_blank$/, title => 1, class => qr/^js-/ }, img => { src => 1, alt => 1, width => 1, height => 1, hspace => 1, vspace => 1, align => 1, sizes => 1, srcset => 1 }, font => { color => 1 }, span => { style => 1 }, diff --git a/templates/web/northamptonshire/index-steps.html b/templates/web/northamptonshire/index-steps.html index 99d11f7e8..6ee7b96b3 100644 --- a/templates/web/northamptonshire/index-steps.html +++ b/templates/web/northamptonshire/index-steps.html @@ -3,12 +3,12 @@ <ol class="big-numbers"> <li>[% question %]</li> <li>[% loc('Locate the problem on a map of the area') %]</li> - <li>[% loc('Enter details of the problem') %]</li> - <li>Confirm the report and [% c.cobrand.council_name %] will investigate</li> <li> + Enter details of the problem.<br> Please enter a single problem per enquiry.<br> The first item described will be taken as the enquiry </li> + <li>Confirm the report and [% c.cobrand.council_name %] will investigate</li> </ol> <section class="full-width"> diff --git a/web/cobrands/tfl/assets.js b/web/cobrands/tfl/assets.js index ccfaad321..86b0143a9 100644 --- a/web/cobrands/tfl/assets.js +++ b/web/cobrands/tfl/assets.js @@ -51,7 +51,6 @@ var tlrn_categories = [ "Debris in the carriageway", "Fallen Tree", "Flooding", - "Flytipping (TfL)", "Graffiti / Flyposting (non-offensive)", "Graffiti / Flyposting (offensive)", "Graffiti / Flyposting on street light (non-offensive)", |