-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merton] Add larger bin process flow.
- Loading branch information
Showing
10 changed files
with
221 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
perllib/FixMyStreet/App/Form/Waste/Request/Merton/Larger.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
package FixMyStreet::App::Form::Waste::Request::Merton::Larger; | ||
|
||
use utf8; | ||
use HTML::FormHandler::Moose; | ||
extends 'FixMyStreet::App::Form::Waste::Request'; | ||
|
||
use constant CONTAINER_REFUSE_240 => 2; | ||
|
||
has_page medical_condition => ( | ||
fields => ['medical_condition', 'continue'], | ||
title => 'Larger black bin request', | ||
intro => 'request/intro.html', | ||
next => sub { | ||
my $data = shift; | ||
return 'how_much' if $data->{medical_condition} eq 'Yes'; | ||
return 'how_many'; | ||
}, | ||
); | ||
|
||
has_field medical_condition => ( | ||
required => 1, | ||
type => 'Select', | ||
widget => 'RadioGroup', | ||
label => 'Does anyone in your household have any medical condition that causes extra waste that cannot be recycled?', | ||
options => [ | ||
{ value => 'Yes', label => 'Yes' }, | ||
{ value => 'No', label => 'No' }, | ||
], | ||
); | ||
|
||
has_page about_you => ( | ||
fields => ['name', 'email', 'phone', 'continue'], | ||
intro => 'about_you.html', | ||
title => 'About you', | ||
next => 'summary', | ||
); | ||
|
||
has_page how_much => ( | ||
fields => ['how_much', 'continue'], | ||
intro => 'request/intro.html', | ||
title => 'Larger black bin request', | ||
next => sub { | ||
my $data = shift; | ||
my $how_much = $data->{how_much}; | ||
return 'how_many' if $how_much eq 'less1'; | ||
return 'request_static' if $how_much eq '3more'; | ||
$data->{'container-' . CONTAINER_REFUSE_240} = 1; | ||
$data->{'quantity-' . CONTAINER_REFUSE_240} = 1; | ||
$data->{'removal-' . CONTAINER_REFUSE_240} = 1; | ||
return 'about_you'; | ||
}, | ||
); | ||
|
||
has_field how_much => ( | ||
required => 1, | ||
type => 'Select', | ||
widget => 'RadioGroup', | ||
label => 'How much non-hazardous, non-recyclable waste does your household produce due to medical conditions?', | ||
options => [ | ||
{ value => 'less1', label => 'Less than 1 black sack a fortnight' }, | ||
{ value => '1or2', label => '1 or 2 black sacks a fortnight' }, | ||
{ value => '3more', label => '3 or more black sacks a fortnight' }, | ||
], | ||
); | ||
|
||
has_page how_many => ( | ||
fields => ['how_many', 'continue'], | ||
title => 'Larger black bin request', | ||
next => sub { | ||
my $data = shift; | ||
return 'request_static' if $data->{how_many} eq 'less5'; | ||
$data->{'container-' . CONTAINER_REFUSE_240} = 1; | ||
$data->{'quantity-' . CONTAINER_REFUSE_240} = 1; | ||
$data->{'removal-' . CONTAINER_REFUSE_240} = 1; | ||
return 'about_you'; | ||
}, | ||
); | ||
|
||
has_field how_many => ( | ||
required => 1, | ||
type => 'Select', | ||
widget => 'RadioGroup', | ||
label => 'How many people live in your home (include you)?', | ||
options => [ | ||
{ value => 'less5', label => '1 to 4' }, | ||
{ value => '5more', label => '5 or more' }, | ||
], | ||
); | ||
|
||
has_page request_static => ( | ||
fields => [], | ||
template => 'waste/request/static.html', | ||
); | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[% IF first_page == 'medical_condition' %] | ||
<p> | ||
We will consider your request. We reserve the right to check the information given. | ||
</p> | ||
|
||
<p> | ||
We will swap your bin for a larger one within 2 weeks, or if your request was unsuccessful we will contact you to let you know. | ||
</p> | ||
[% END %] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[% IF form.current_page.name == 'how_much' %] | ||
<p class="govuk-body"> | ||
You must not put hazardous clinical waste in your rubbish bin. This includes used syringes, and items contaminated with infectious body fluids. | ||
</p> | ||
<p class="govuk-body"> | ||
We provide a separate service for collecting this, please see our | ||
<a href="https://www.merton.gov.uk/rubbish-and-recycling/bulky-hazardous-and-clinical-waste/clinical-waste">Clinical waste</a> page. | ||
</p> | ||
<p class="govuk-body"> | ||
You can put non-hazardous items in your rubbish bin, such as sanitary towels, nappies and incontinence pads (also known as sanpro waste). | ||
</p> | ||
|
||
[% END %] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[% USE date(format='%Y%m%d') ~%] | ||
[% PROCESS 'waste/header.html' %] | ||
|
||
<h1 class="govuk-heading-xl">Larger black bin request</h1> | ||
|
||
[% IF property %] | ||
[% INCLUDE 'waste/_address_display.html' %] | ||
[% END %] | ||
|
||
[% IF form.saved_data.how_much == '3more' %] | ||
<p class="govuk-body"> | ||
<strong>Clinical waste</strong> | ||
</p> | ||
<p class="govuk-body"> | ||
Please visit our | ||
<a href="https://www.merton.gov.uk/rubbish-and-recycling/bulky-hazardous-and-clinical-waste/clinical-waste">Clinical Waste</a> | ||
page to find out about arranging a separate collection of your sanitary waste. | ||
</p> | ||
[% ELSIF form.saved_data.how_many == 'less5' %] | ||
<p class="govuk-body"> | ||
<strong>Sorry, you are not eligible for a larger bin</strong> | ||
</p> | ||
<p class="govuk-body"> | ||
If you recycle everything you can, including food waste, you should find that you have enough space in your rubbish bin. | ||
<a href="https://www.merton.gov.uk/acceptable">Find out what you can recycle</a> | ||
</p> | ||
[% END %] | ||
|
||
[% INCLUDE footer.html %] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters