diff --git a/t/app/controller/waste_bexley_container_requests.t b/t/app/controller/waste_bexley_container_requests.t index c1b0ecbebd..129b793dcd 100644 --- a/t/app/controller/waste_bexley_container_requests.t +++ b/t/app/controller/waste_bexley_container_requests.t @@ -862,6 +862,14 @@ FixMyStreet::override_config { $mech->content_contains( 'Your container request has been sent', 'Request successful' ); + note 'Confirmation summary'; + $mech->content_contains( 'class="li-delivery">Green Wheelie Bin' ); + $mech->content_contains( 'class="li-delivery">White Recycling Box' ); + $mech->content_contains( 'class="li-delivery">Recycling Box Lids' ); + $mech->content_contains( 'class="li-delivery">Brown Caddy' ); + $mech->content_contains( 'class="li-removal">Green Wheelie Bin' ); + $mech->content_contains( 'class="li-removal">Brown Caddy' ); + my $rows = FixMyStreet::DB->resultset("Problem")->order_by('id'); is $rows->count, 7, 'correct number of reports raised'; diff --git a/templates/web/bexley/waste/_confirmation_after.html b/templates/web/bexley/waste/_confirmation_after.html index 99ed148c6a..5c055b318f 100644 --- a/templates/web/bexley/waste/_confirmation_after.html +++ b/templates/web/bexley/waste/_confirmation_after.html @@ -1,4 +1,11 @@ -[% IF report.category == 'Report missed collection' %] +[% + is_missed_collection = report.category == 'Report missed collection'; + is_delivery_request = report.category == 'Request new container'; + is_removal_request = report.category == 'Request container removal'; + is_container_request = is_delivery_request || is_removal_request; +%] + +[% IF is_missed_collection %]

Bins reported as missed:

@@ -19,7 +26,62 @@

What happens next?


Please leave your bin(s) out until our contractor returns.
- If you need to contact us about this report, please quote your reference number. + If you need to contact us about a report, please quote its reference number. +

+ +
+ +[% ELSIF is_container_request %] + + [% + titles = [ report.title ]; titles.import( report.get_extra_metadata('grouped_titles') ); + + delivery_prefix = 'Request new '; + removal_prefix = 'Request removal of '; + delivery_titles = []; + removal_titles = []; + + FOR title IN titles; + IF title.match(delivery_prefix); + delivery_titles.push( title.remove(delivery_prefix) ); + ELSIF title.match(removal_prefix); + removal_titles.push( title.remove(removal_prefix) ); + END; + END; + %] + + [% IF delivery_titles.size %] +

New bin(s) requested for delivery:

+

+

+

+ [% END %] + + [% IF removal_titles.size %] +

Old bin(s) requested for collection:

+

+

+

+ [% END %] + +

Address:

+

[% property.address %]

+ +

What happens next?

+

+ Your request has been sent to our waste contractor and will be completed within [% cobrand.wasteworks_config.request_timeframe || '10 working days' %]. +
+ Please ensure that old bins which are due to be collected are left somewhere they can be accessed. +
+ If you need to contact us about a report, please quote its reference number.