From bcdf2a93187318bc982b82980a38a85425bb4348 Mon Sep 17 00:00:00 2001 From: Victoria Mihell-Hale Date: Mon, 11 Nov 2024 11:42:26 +0000 Subject: [PATCH] WIP [Bexley][WW] Add generic order link for deprecated boxes --- perllib/FixMyStreet/Cobrand/Bexley/Waste.pm | 3 ++- t/app/controller/waste_bexley_container_requests.t | 2 +- templates/web/bexley/waste/_more_services_sidebar.html | 2 +- templates/web/bexley/waste/_services_request.html | 5 +++-- templates/web/bexley/waste/container_delivery_intro.html | 3 +++ 5 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 templates/web/bexley/waste/container_delivery_intro.html diff --git a/perllib/FixMyStreet/Cobrand/Bexley/Waste.pm b/perllib/FixMyStreet/Cobrand/Bexley/Waste.pm index 992e51a9d3..25e93da2c0 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley/Waste.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley/Waste.pm @@ -1303,6 +1303,7 @@ sub construct_bin_request_form { $page_list = [ request => { + intro => 'container_delivery_intro.html', fields => [ grep { ! ref $_ } @$delivery_field_list, 'continue' ], title => 'Which containers do you need?', check_unique_id => 0, @@ -1726,7 +1727,7 @@ sub _set_request_containers { push @containers_for_delivery, _containers_for_requests()->{'Recycling Box Lids'}; - $property->{can_order_lids} = 1; + $property->{has_boxes} = 1; } $boxes_done = 1; diff --git a/t/app/controller/waste_bexley_container_requests.t b/t/app/controller/waste_bexley_container_requests.t index c1b0ecbebd..33a998755a 100644 --- a/t/app/controller/waste_bexley_container_requests.t +++ b/t/app/controller/waste_bexley_container_requests.t @@ -173,7 +173,7 @@ subtest '_set_request_containers' => sub { note 'Checking containers set on property'; cmp_deeply $property, { household_size_check => 1, - can_order_lids => 1, + has_boxes => 1, containers_for_delivery => [ { name => 'Green Wheelie Bin', diff --git a/templates/web/bexley/waste/_more_services_sidebar.html b/templates/web/bexley/waste/_more_services_sidebar.html index 6fbb2c04a8..90323e736e 100644 --- a/templates/web/bexley/waste/_more_services_sidebar.html +++ b/templates/web/bexley/waste/_more_services_sidebar.html @@ -14,7 +14,7 @@

More services

[% IF property.containers_for_removal.size %]
  • Order removal of old containers
  • [% END %] - [% IF property.can_order_lids %] + [% IF property.has_boxes %]
  • Order lids for recycling boxes
  • [% END %] [% END %] diff --git a/templates/web/bexley/waste/_services_request.html b/templates/web/bexley/waste/_services_request.html index 87d0fbeeb6..ce1f0b8628 100644 --- a/templates/web/bexley/waste/_services_request.html +++ b/templates/web/bexley/waste/_services_request.html @@ -1,4 +1,5 @@ -[% IF unit.delivery_allowed && !unit.delivery_open %] +[% SET is_box = unit.service_name.match('Box$') %] +[% IF ( unit.delivery_allowed || is_box ) && !unit.delivery_open %]
    @@ -10,7 +11,7 @@ [% END %] - +
    [% END %] diff --git a/templates/web/bexley/waste/container_delivery_intro.html b/templates/web/bexley/waste/container_delivery_intro.html new file mode 100644 index 0000000000..ef3045c5c1 --- /dev/null +++ b/templates/web/bexley/waste/container_delivery_intro.html @@ -0,0 +1,3 @@ +[% IF property.has_boxes %] +

    Certain recycling boxes are being phased out and can no longer be ordered. Please use the box options below.

    +[% END %]