diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Waste.pm | 42 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bromley.pm | 15 | ||||
-rw-r--r-- | perllib/Integrations/Echo.pm | 27 | ||||
-rw-r--r-- | t/app/controller/waste.t | 27 | ||||
-rw-r--r-- | t/cobrand/bromley.t | 20 | ||||
-rw-r--r-- | templates/web/base/waste/bin_days.html | 6 | ||||
-rw-r--r-- | templates/web/base/waste/enquiry.html | 2 | ||||
-rw-r--r-- | templates/web/bromley/report/_updates_disallowed_message.html | 4 | ||||
-rw-r--r-- | templates/web/bromley/waste/services.html | 8 |
9 files changed, 77 insertions, 74 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Waste.pm b/perllib/FixMyStreet/App/Controller/Waste.pm index 152c7c28e..fe177e9fe 100644 --- a/perllib/FixMyStreet/App/Controller/Waste.pm +++ b/perllib/FixMyStreet/App/Controller/Waste.pm @@ -23,8 +23,8 @@ sub auto : Private { sub index : Path : Args(0) { my ( $self, $c ) = @_; - if (my $uprn = $c->get_param('address')) { - $c->detach('redirect_to_uprn', [ $uprn ]); + if (my $id = $c->get_param('address')) { + $c->detach('redirect_to_id', [ $id ]); } $c->stash->{title} = 'What is your address?'; @@ -58,9 +58,9 @@ sub address_list_form { ); } -sub redirect_to_uprn : Private { - my ($self, $c, $uprn) = @_; - my $uri = '/waste/uprn/' . $uprn; +sub redirect_to_id : Private { + my ($self, $c, $id) = @_; + my $uri = '/waste/' . $id; my $type = $c->get_param('type') || ''; $uri .= '/request' if $type eq 'request'; $uri .= '/report' if $type eq 'report'; @@ -68,20 +68,19 @@ sub redirect_to_uprn : Private { $c->detach; } -sub uprn : Chained('/') : PathPart('waste/uprn') : CaptureArgs(1) { - my ($self, $c, $uprn) = @_; +sub property : Chained('/') : PathPart('waste') : CaptureArgs(1) { + my ($self, $c, $id) = @_; - if ($uprn eq 'missing') { + if ($id eq 'missing') { $c->stash->{template} = 'waste/missing.html'; $c->detach; } $c->forward('/auth/get_csrf_token'); - my $property = $c->stash->{property} = $c->cobrand->call_hook(look_up_property => $uprn); + my $property = $c->stash->{property} = $c->cobrand->call_hook(look_up_property => $id); $c->detach( '/page_error_404_not_found', [] ) unless $property; - $c->stash->{uprn} = $uprn; $c->stash->{latitude} = $property->{latitude}; $c->stash->{longitude} = $property->{longitude}; @@ -89,11 +88,11 @@ sub uprn : Chained('/') : PathPart('waste/uprn') : CaptureArgs(1) { $c->stash->{services} = { map { $_->{service_id} => $_ } @{$c->stash->{service_data}} }; } -sub bin_days : Chained('uprn') : PathPart('') : Args(0) { +sub bin_days : Chained('property') : PathPart('') : Args(0) { my ($self, $c) = @_; } -sub calendar : Chained('uprn') : PathPart('calendar.ics') : Args(0) { +sub calendar : Chained('property') : PathPart('calendar.ics') : Args(0) { my ($self, $c) = @_; $c->res->header(Content_Type => 'text/calendar'); require Data::ICal::RFC7986; @@ -110,8 +109,8 @@ sub calendar : Chained('uprn') : PathPart('calendar.ics') : Args(0) { 'x-published-ttl' => 'P1D', calscale => 'GREGORIAN', 'x-wr-timezone' => 'Europe/London', - source => [ $c->uri_for_action($c->action, [ $c->stash->{uprn} ]), { value => 'URI' } ], - url => $c->uri_for_action('waste/bin_days', [ $c->stash->{uprn} ]), + source => [ $c->uri_for_action($c->action, [ $c->stash->{property}{id} ]), { value => 'URI' } ], + url => $c->uri_for_action('waste/bin_days', [ $c->stash->{property}{id} ]), ); my $events = $c->cobrand->bin_future_collections; @@ -175,7 +174,7 @@ sub construct_bin_request_form { return $field_list; } -sub request : Chained('uprn') : Args(0) { +sub request : Chained('property') : Args(0) { my ($self, $c) = @_; my $field_list = construct_bin_request_form($c); @@ -231,7 +230,7 @@ sub construct_bin_report_form { return $field_list; } -sub report : Chained('uprn') : Args(0) { +sub report : Chained('property') : Args(0) { my ($self, $c) = @_; my $field_list = construct_bin_report_form($c); @@ -266,7 +265,7 @@ sub process_report_data : Private { return 1; } -sub enquiry : Chained('uprn') : Args(0) { +sub enquiry : Chained('property') : Args(0) { my ($self, $c) = @_; if (my $template = $c->get_param('template')) { @@ -279,18 +278,18 @@ sub enquiry : Chained('uprn') : Args(0) { my $category = $c->get_param('category'); my $service = $c->get_param('service_id'); if (!$category || !$service || !$c->stash->{services}{$service}) { - $c->res->redirect('/waste/uprn/' . $c->stash->{uprn}); + $c->res->redirect('/waste/' . $c->stash->{property}{id}); $c->detach; } my ($contact) = grep { $_->category eq $category } @{$c->stash->{contacts}}; if (!$contact) { - $c->res->redirect('/waste/uprn/' . $c->stash->{uprn}); + $c->res->redirect('/waste/' . $c->stash->{property}{id}); $c->detach; } my $field_list = []; foreach (@{$contact->get_metadata_for_input}) { - next if $_->{code} eq 'service_id' || $_->{code} eq 'uprn'; + next if $_->{code} eq 'service_id' || $_->{code} eq 'uprn' || $_->{code} eq 'property_id'; my $type = 'Text'; $type = 'TextArea' if 'text' eq ($_->{datatype} || ''); my $required = $_->{required} eq 'true' ? 1 : 0; @@ -421,7 +420,8 @@ sub add_report : Private { $c->set_param('category', $data->{category}); $c->set_param('title', $data->{title}); $c->set_param('detail', $data->{detail}); - $c->set_param('uprn', $c->stash->{uprn}); + $c->set_param('uprn', $c->stash->{property}{uprn}); + $c->set_param('property_id', $c->stash->{property}{id}); $c->forward('setup_categories_and_bodies') unless $c->stash->{contacts}; $c->forward('/report/new/non_map_creation', [['/waste/remove_name_errors']]) or return; diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm index fc41eae28..0885f5b6b 100644 --- a/perllib/FixMyStreet/Cobrand/Bromley.pm +++ b/perllib/FixMyStreet/Cobrand/Bromley.pm @@ -426,7 +426,7 @@ sub bin_addresses_for_postcode { $echo = Integrations::Echo->new(%$echo); my $points = $echo->FindPoints($pc); my $data = [ map { { - value => $_->{SharedRef}{Value}{anyType}, + value => $_->{Id}, label => FixMyStreet::Template::title($_->{Description}), } } @$points ]; natkeysort_inplace { $_->{label} } @$data; @@ -435,7 +435,7 @@ sub bin_addresses_for_postcode { sub look_up_property { my $self = shift; - my $uprn = shift; + my $id = shift; my $cfg = $self->feature('echo'); my $echo = Integrations::Echo->new(%$cfg); @@ -448,10 +448,10 @@ sub look_up_property { $self->{c}->detach('/page_error_403_access_denied', []) if $count > $cfg->{max_per_day}; } - my $result = $echo->GetPointAddress($uprn); + my $result = $echo->GetPointAddress($id); return { id => $result->{Id}, - uprn => $uprn, + uprn => $result->{SharedRef}{Value}{anyType}, address => FixMyStreet::Template::title($result->{Description}), latitude => $result->{Coordinates}{GeoPoint}{Latitude}, longitude => $result->{Coordinates}{GeoPoint}{Longitude}, @@ -538,7 +538,7 @@ sub bin_services_for_address { my $echo = $self->feature('echo'); $echo = Integrations::Echo->new(%$echo); - my $result = $echo->GetServiceUnitsForObject($property->{uprn}); + my $result = $echo->GetServiceUnitsForObject($property->{id}); return [] unless @$result; my $events = $echo->GetEventsForObject('PointAddress', $property->{id}); @@ -591,7 +591,8 @@ sub bin_services_for_address { my $state = $_->{State}{Name} || ''; my $task_type_id = $_->{TaskTypeId} || ''; - my $resolution = $_->{Resolution}{Name} || ''; + my $orig_resolution = $_->{Resolution}{Name} || ''; + my $resolution = $orig_resolution; my $resolution_id = $_->{Resolution}{Ref}{Value}{anyType}; if ($resolution_id) { my $template = FixMyStreet::DB->resultset('ResponseTemplate')->search({ @@ -627,7 +628,7 @@ sub bin_services_for_address { } # If the task is ended and could not be done, do not allow reporting - if ($state eq 'Not Completed' || ($state eq 'Completed' && $_->{Resolution}{Name} eq 'Excess Waste')) { + if ($state eq 'Not Completed' || ($state eq 'Completed' && $orig_resolution eq 'Excess Waste')) { $row->{report_allowed} = 0; $row->{report_locked_out} = 1; } diff --git a/perllib/Integrations/Echo.pm b/perllib/Integrations/Echo.pm index bf4b453e6..d6783677c 100644 --- a/perllib/Integrations/Echo.pm +++ b/perllib/Integrations/Echo.pm @@ -129,14 +129,14 @@ sub GetTasks { return force_arrayref($res, 'Task'); } -sub _uprn_ref { +sub _id_ref { require SOAP::Lite; - my $uprn = shift; + my $id = shift; tie(my %obj, 'Tie::IxHash', - Key => 'Uprn', + Key => 'Id', Type => 'PointAddress', Value => [ - { 'msArray:anyType' => SOAP::Data->value($uprn)->type('string') }, + { 'msArray:anyType' => SOAP::Data->value($id) }, ], ); return \%obj; @@ -144,10 +144,11 @@ sub _uprn_ref { sub GetPointAddress { my $self = shift; - my $uprn = shift; - my $obj = _uprn_ref($uprn); + my $id = shift; + my $obj = _id_ref($id); return { Id => '12345', + SharedRef => { Value => { anyType => '1000000002' } }, PointType => 'PointAddress', PointAddressType => { Name => 'House' }, Coordinates => { GeoPoint => { Latitude => 51.401546, Longitude => 0.015415 } }, @@ -165,11 +166,11 @@ sub FindPoints { Postcode => $pc, ); return [ - { Description => '1 Example Street, Bromley, BR1 1AA', SharedRef => { Value => { anyType => 1000000001 } } }, - { Description => '2 Example Street, Bromley, BR1 1AA', SharedRef => { Value => { anyType => 1000000002 } } }, - { Description => '3 Example Street, Bromley, BR1 1AA', SharedRef => { Value => { anyType => 1000000003 } } }, - { Description => '4 Example Street, Bromley, BR1 1AA', SharedRef => { Value => { anyType => 1000000004 } } }, - { Description => '5 Example Street, Bromley, BR1 1AA', SharedRef => { Value => { anyType => 1000000005 } } }, + { Description => '1 Example Street, Bromley, BR1 1AA', Id => '11345', SharedRef => { Value => { anyType => 1000000001 } } }, + { Description => '2 Example Street, Bromley, BR1 1AA', Id => '12345', SharedRef => { Value => { anyType => 1000000002 } } }, + { Description => '3 Example Street, Bromley, BR1 1AA', Id => '13345', SharedRef => { Value => { anyType => 1000000003 } } }, + { Description => '4 Example Street, Bromley, BR1 1AA', Id => '14345', SharedRef => { Value => { anyType => 1000000004 } } }, + { Description => '5 Example Street, Bromley, BR1 1AA', Id => '15345', SharedRef => { Value => { anyType => 1000000005 } } }, ] if $self->sample_data; my $res = $self->call('FindPoints', query => \%obj); return force_arrayref($res, 'PointInfo'); @@ -177,8 +178,8 @@ sub FindPoints { sub GetServiceUnitsForObject { my $self = shift; - my $uprn = shift; - my $obj = _uprn_ref($uprn); + my $id = shift; + my $obj = _id_ref($id); my $from = DateTime->now->set_time_zone(FixMyStreet->local_time_zone); return [ { Id => 1001, diff --git a/t/app/controller/waste.t b/t/app/controller/waste.t index c86802631..748904995 100644 --- a/t/app/controller/waste.t +++ b/t/app/controller/waste.t @@ -25,6 +25,7 @@ sub create_contact { $contact->set_extra_metadata(group => ['Waste']); $contact->set_extra_fields( { code => 'uprn', required => 1, automated => 'hidden_field' }, + { code => 'property_id', required => 1, automated => 'hidden_field' }, { code => 'service_id', required => 0, automated => 'hidden_field' }, @extra, ); @@ -55,7 +56,7 @@ FixMyStreet::override_config { set_fixed_time('2020-05-28T17:00:00Z'); # After sample data collection $mech->get_ok('/waste'); $mech->submit_form_ok({ with_fields => { postcode => 'BR1 1AA' } }); - $mech->submit_form_ok({ with_fields => { address => '1000000002' } }); + $mech->submit_form_ok({ with_fields => { address => '12345' } }); $mech->content_contains('2 Example Street'); $mech->content_contains('Food Waste'); }; @@ -108,7 +109,7 @@ FixMyStreet::override_config { $mech->log_in_ok($staff_user->email); $mech->get_ok('/report/' . $report->id); $mech->content_lacks('Provide an update'); - $mech->content_contains( '<a href="/waste/uprn/1000000002">See your bin collections</a>' ); + $mech->content_contains( '<a href="/waste/12345">See your bin collections</a>' ); $mech->host('www.fixmystreet.com'); $res = $mech->get('/report/' . $report->id); @@ -122,7 +123,7 @@ FixMyStreet::override_config { $mech->host('bromley.fixmystreet.com'); }; subtest 'Request a new container' => sub { - $mech->get_ok('/waste/uprn/1000000002/request'); + $mech->get_ok('/waste/12345/request'); $mech->submit_form_ok({ form_number => 2 }); $mech->content_contains('Please specify what you need'); $mech->submit_form_ok({ with_fields => { 'container-1' => 1 } }); @@ -140,16 +141,16 @@ FixMyStreet::override_config { is $report->get_extra_field_value('Container_Type'), 1; }; subtest 'Thing already requested' => sub { - $mech->get_ok('/waste/uprn/1000000002'); + $mech->get_ok('/waste/12345'); $mech->content_contains('A new paper & cardboard container request has been made'); }; subtest 'General enquiry, bad data' => sub { - $mech->get_ok('/waste/uprn/1000000002/enquiry'); - is $mech->uri->path, '/waste/uprn/1000000002'; - $mech->get_ok('/waste/uprn/1000000002/enquiry?category=Bad'); - is $mech->uri->path, '/waste/uprn/1000000002'; - $mech->get_ok('/waste/uprn/1000000002/enquiry?service=1'); - is $mech->uri->path, '/waste/uprn/1000000002'; + $mech->get_ok('/waste/12345/enquiry'); + is $mech->uri->path, '/waste/12345'; + $mech->get_ok('/waste/12345/enquiry?category=Bad'); + is $mech->uri->path, '/waste/12345'; + $mech->get_ok('/waste/12345/enquiry?service=1'); + is $mech->uri->path, '/waste/12345'; }; subtest 'Checking calendar' => sub { $mech->follow_link_ok({ text => 'Add to your calendar (.ics file)' }); @@ -165,7 +166,7 @@ FixMyStreet::override_config { }; subtest 'General enquiry, on behalf of someone else' => sub { $mech->log_in_ok($staff_user->email); - $mech->get_ok('/waste/uprn/1000000002/enquiry?category=General+enquiry&service_id=537'); + $mech->get_ok('/waste/12345/enquiry?category=General+enquiry&service_id=537'); $mech->submit_form_ok({ with_fields => { extra_Notes => 'Some notes' } }); $mech->submit_form_ok({ with_fields => { name => "Test McTest", email => $user->email } }); $mech->content_contains('Some notes'); @@ -195,8 +196,8 @@ FixMyStreet::override_config { $integ->mock(call => sub { return SOAP::Result->new(result => { PointInfo => [ - { Description => '1 Example Street', SharedRef => { Value => { anyType => 1000000001 } } }, - { Description => '2 Example Street', SharedRef => { Value => { anyType => 1000000002 } } }, + { Description => '1 Example Street', Id => '11345', SharedRef => { Value => { anyType => 1000000001 } } }, + { Description => '2 Example Street', Id => '12345', SharedRef => { Value => { anyType => 1000000002 } } }, ], }); }); diff --git a/t/cobrand/bromley.t b/t/cobrand/bromley.t index 13f4f2308..561b5b283 100644 --- a/t/cobrand/bromley.t +++ b/t/cobrand/bromley.t @@ -270,7 +270,7 @@ FixMyStreet::override_config { }, sub { subtest 'test open enquiries' => sub { set_fixed_time('2020-05-19T12:00:00Z'); # After sample food waste collection - $mech->get_ok('/waste/uprn/12345'); + $mech->get_ok('/waste/12345'); $mech->content_like(qr/Mixed Recycling.*?Next collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 20th May\s+\(this collection has been adjusted/s); $mech->follow_link_ok({ text => 'Report a problem with a food waste collection' }); $mech->content_contains('Waste spillage'); @@ -280,7 +280,7 @@ FixMyStreet::override_config { subtest 'test crew reported issue' => sub { set_fixed_time('2020-05-21T12:00:00Z'); # After sample container mix - $mech->get_ok('/waste/uprn/12345'); + $mech->get_ok('/waste/12345'); $mech->content_like(qr/Mixed Recycling.*?Last collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 20th May\s+\(this collection has been adjusted/s); $mech->content_contains('A missed collection cannot be reported, please see the last collection status above.'); $mech->content_lacks('Report a mixed recycling '); @@ -289,14 +289,14 @@ FixMyStreet::override_config { subtest 'test reporting before/after completion' => sub { set_fixed_time('2020-05-27T11:00:00Z'); - $mech->get_ok('/waste/uprn/12345'); + $mech->get_ok('/waste/12345'); $mech->content_like(qr/Refuse collection.*?Last collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 27th May\s+\(completed at 10:00am\)\s*<p>\s*Wrong Bin Out/s); $mech->content_like(qr/Paper & Cardboard.*?Next collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 27th May\s+\(in progress\)/s); $mech->follow_link_ok({ text => 'Report a problem with a paper & cardboard collection' }); $mech->content_lacks('Waste spillage'); set_fixed_time('2020-05-27T19:00:00Z'); - $mech->get_ok('/waste/uprn/12345'); + $mech->get_ok('/waste/12345'); $mech->content_like(qr/Refuse collection.*?Last collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 27th May\s+\(completed at 10:00am\)\s*<p>\s*Wrong Bin Out/s); $mech->content_like(qr/Paper & Cardboard.*?Last collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 27th May\s*<\/dd>/s); $mech->follow_link_ok({ text => 'Report a problem with a paper & cardboard collection' }); @@ -317,19 +317,19 @@ FixMyStreet::override_config { }; subtest 'test reporting before/after completion' => sub { - $mech->get_ok('/waste/uprn/12345'); + $mech->get_ok('/waste/12345'); $mech->content_contains('(completed at 10:00am)'); $mech->content_contains('We could not collect your waste as it was not correctly presented.'); $mech->content_lacks('Report a paper & cardboard collection'); $mech->content_contains('Report a refuse collection'); set_fixed_time('2020-05-28T12:00:00Z'); - $mech->get_ok('/waste/uprn/12345'); + $mech->get_ok('/waste/12345'); $mech->content_contains('Report a refuse collection'); set_fixed_time('2020-05-29T12:00:00Z'); - $mech->get_ok('/waste/uprn/12345'); + $mech->get_ok('/waste/12345'); $mech->content_contains('Report a refuse collection'); set_fixed_time('2020-05-30T12:00:00Z'); - $mech->get_ok('/waste/uprn/12345'); + $mech->get_ok('/waste/12345'); $mech->content_lacks('Report a refuse collection'); restore_time(); }; @@ -346,8 +346,8 @@ subtest 'test waste max-per-day' => sub { SKIP: { skip( "No memcached", 2 ) unless Memcached::increment('bromley-test'); Memcached::delete("bromley-test"); - $mech->get_ok('/waste/uprn/12345'); - $mech->get('/waste/uprn/12345'); + $mech->get_ok('/waste/12345'); + $mech->get('/waste/12345'); is $mech->res->code, 403, 'Now forbidden'; } }; diff --git a/templates/web/base/waste/bin_days.html b/templates/web/base/waste/bin_days.html index e852507fb..54c21ae0c 100644 --- a/templates/web/base/waste/bin_days.html +++ b/templates/web/base/waste/bin_days.html @@ -80,7 +80,7 @@ <div class="aside-download"> <h3>Download your collection schedule</h3> <ul> - <li><a href="[% c.uri_for_action('waste/calendar', [ uprn ]) %]">Add to your calendar (.ics file)</a></li> + <li><a href="[% c.uri_for_action('waste/calendar', [ property.id ]) %]">Add to your calendar (.ics file)</a></li> </ul> </div> [% IF any_report_allowed OR any_request_allowed %] @@ -88,10 +88,10 @@ <h3>More services</h3> <ul> [% IF any_report_allowed %] - <li><a href="[% c.uri_for_action('waste/report', [ uprn ]) %]">Report a missed collection</a></li> + <li><a href="[% c.uri_for_action('waste/report', [ property.id ]) %]">Report a missed collection</a></li> [% END %] [% IF any_request_allowed %] - <li><a href="[% c.uri_for_action('waste/request', [ uprn ]) %]">Request a new container</a></li> + <li><a href="[% c.uri_for_action('waste/request', [ property.id ]) %]">Request a new container</a></li> [% END %] </ul> </div> diff --git a/templates/web/base/waste/enquiry.html b/templates/web/base/waste/enquiry.html index 8993b0fd8..06c8f7f76 100644 --- a/templates/web/base/waste/enquiry.html +++ b/templates/web/base/waste/enquiry.html @@ -15,7 +15,7 @@ <dd class="waste__address__property">[% services.$service_id.service_name %]</dd> </dl> -<form method="get" action="[% c.uri_for_action('waste/enquiry', [ uprn ]) %]"> +<form method="get" action="[% c.uri_for_action('waste/enquiry', [ property.id ]) %]"> <div class="govuk-form-group"> [% PROCESS radio field = { id = 'category', diff --git a/templates/web/bromley/report/_updates_disallowed_message.html b/templates/web/bromley/report/_updates_disallowed_message.html index 059b92494..25e3a57c4 100644 --- a/templates/web/bromley/report/_updates_disallowed_message.html +++ b/templates/web/bromley/report/_updates_disallowed_message.html @@ -1,8 +1,8 @@ [% IF c.cobrand.updates_disallowed(problem) == 'waste'; - SET uprn = problem.get_extra_field_value('uprn'); + SET property_id = problem.get_extra_field_value('property_id'); %] <p> - <a href="/waste[% IF uprn %]/uprn/[% uprn %][% END %]">See your bin collections</a>. + <a href="/waste[% IF property_id %]/[% property_id %][% END %]">See your bin collections</a>. </p> <div class="bromley-waste-credits"> diff --git a/templates/web/bromley/waste/services.html b/templates/web/bromley/waste/services.html index 121c6a2a3..6fc654f07 100644 --- a/templates/web/bromley/waste/services.html +++ b/templates/web/bromley/waste/services.html @@ -8,7 +8,7 @@ </span> [% ELSIF unit.report_allowed %] [% any_report_allowed = 1 %] - <form method="post" action="[% c.uri_for_action('waste/report', [ uprn ]) %]"> + <form method="post" action="[% c.uri_for_action('waste/report', [ property.id ]) %]"> <input type="hidden" name="token" value="[% csrf_token %]"> <input type="hidden" name="service-[% unit.service_id %]" value="1"> <input type="submit" value="Report a [% unit.service_name FILTER lower %] collection as missed" class="waste-service-descriptor waste-service-link"> @@ -18,7 +18,7 @@ [% ELSE %] <span class="waste-service-descriptor">Please note that missed collections can only be reported within 2 working days of your scheduled collection day.</span> [% END %] - <a href="[% c.uri_for_action('waste/enquiry', [ uprn ]) %]?template=problem&service_id=[% unit.service_id %]" class="waste-service-link waste-service-descriptor">Report a problem with a [% unit.service_name FILTER lower %] collection</a> + <a href="[% c.uri_for_action('waste/enquiry', [ property.id ]) %]?template=problem&service_id=[% unit.service_id %]" class="waste-service-link waste-service-descriptor">Report a problem with a [% unit.service_name FILTER lower %] collection</a> [% IF unit.request_open %] <span class="waste-service-descriptor"> A new [% unit.service_name FILTER lower %] container request has been made @@ -26,13 +26,13 @@ </span> [% ELSIF unit.request_allowed %] [% any_request_allowed = 1 %] - <form method="post" action="[% c.uri_for_action('waste/request', [ uprn ]) %]"> + <form method="post" action="[% c.uri_for_action('waste/request', [ property.id ]) %]"> <input type="hidden" name="token" value="[% csrf_token %]"> <input type="hidden" name="container-[% unit.request_containers.0 %]" value="1"> <input type="submit" value="Request a new [% unit.service_name FILTER lower %] container" class="waste-service-descriptor waste-service-link"> </form> [% END %] - <form method="get" action="[% c.uri_for_action('waste/enquiry', [ uprn ]) %]"> + <form method="get" action="[% c.uri_for_action('waste/enquiry', [ property.id ]) %]"> <input type="hidden" name="service_id" value="[% unit.service_id %]"> <input type="hidden" name="category" id="category" value="General Enquiry"> <input type="submit" value="Contact us about a [% unit.service_name FILTER lower %] collection" class="waste-service-descriptor waste-service-link"> |