Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route foster care screens #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,23 @@ router.post('/part-1/hospital/overnight-stays', function(request, response) {
}
})

router.post('/part-1/foster-care/foster-carer', function(request, response) {

var isFosterCarer = request.session.data['foster-carer']
if (isFosterCarer === "yes"){
response.redirect("/part-1/foster-care/when-child-placed")
} else {
response.redirect("/part-1/foster-care/relationship")
}
})

router.post('/part-1/foster-care/who-placed', function(request, response) {

var whoPlaced = request.session.data['who-placed']
if (whoPlaced === "parent"){
response.redirect("/end-screen")
} else {
response.redirect("/part-1/foster-care/name-of-la")
}
})

43 changes: 43 additions & 0 deletions app/views/end-screen.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
End – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}
<div class="govuk-phase-banner">
<p class="govuk-phase-banner__content">
<strong class="govuk-tag govuk-phase-banner__content__tag">
Alpha
</strong>
<span class="govuk-phase-banner__text">
This is a new service – your <a class="govuk-link" href="#">feedback</a> will help us to improve it.
</span>
</p>
</div>
<a class="govuk-back-link" href="javascript:history.back()">Back</a>
{% endblock %}

{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full">

<h1 class="govuk-heading-l">
Thank you - this part of the testing is done
</h1>



</div>

<br>
<br>
{{ govukButton({
text: " Return to Home page",
href: "/"
}) }}

</div>

{% endblock %}
13 changes: 13 additions & 0 deletions app/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ <h1 class="govuk-heading-xl">
</td>
</tr>
</tbody>
<tbody class="govuk-table__body">
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">Foster carers</th>
<td class="govuk-table__cell">
<ul class="govuk-list govuk-list--bullet">
<li><a href="#"></a>Initial Prototype</li>
</ul>
</td>
<td class="govuk-table__cell">
<a href="part-1/foster-care/foster-carer">Foster carers</a> <br><br>
</td>
</tr>
</tbody>
<tbody class="govuk-table__body">
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">Time in hospital</th>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
Question page template – {{ serviceName }} – GOV.UK Prototype Kit
Foster carer – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}
Expand All @@ -21,39 +21,36 @@
{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<div class="govuk-grid-column-two-thirds">

<h1 class="govuk-heading-l">
Are you a foster carer for the child?
</h1>

<form class="form" action="/path/of/next/page" method="post">
<form class="form" method="post">

<div class="govuk-radios govuk-radios--inline" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changedName" name="changedName" type="radio" value="yes">
<label class="govuk-label govuk-radios__label" for="changedName">
<input class="govuk-radios__input" id="foster-carer" name="foster-carer" type="radio" value="yes">
<label class="govuk-label govuk-radios__label" for="foster-carer">
Yes
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changedName-2" name="changedName" type="radio" value="no">
<label class="govuk-label govuk-radios__label" for="changedName-2">
<input class="govuk-radios__input" id="foster-carer-2" name="foster-carer" type="radio" value="no">
<label class="govuk-label govuk-radios__label" for="foster-carer-2">
No
</label>
</div>

</form>


</div>

<br>
<br>
<form class="form" action="#" method="post">
<button type="submit" class="govuk-button" data-module="govuk-button"><a href="part-1/child-name"></a>
Save and continue
</button>
<button type="submit" class="govuk-button" data-module="govuk-button">
Save and continue
</button>
</form>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
Question page template – {{ serviceName }} – GOV.UK Prototype Kit
Organisation address – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}
Expand All @@ -21,7 +21,7 @@
{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<div class="govuk-grid-column-two-thirds">

<fieldset class="govuk-fieldset">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
Expand Down Expand Up @@ -62,12 +62,10 @@ <h1 class="govuk-fieldset__heading">
<input class="govuk-input govuk-input--width-10" id="address-postcode" name="addressPostcode" type="text" autocomplete="postal-code">
</div>
</fieldset>
<form class="form" action="#" method="post">
{{ govukButton({
text: " Save and Continue"
}) }}

</form>
{{ govukButton({
text: " Save and Continue",
href: "la-telephone"
}) }}

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
Question page template – {{ serviceName }} – GOV.UK Prototype Kit
Organisation phone – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}
Expand All @@ -21,13 +21,12 @@
{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<div class="govuk-grid-column-two-thirds">

<h1 class="govuk-heading-l">
What is the telephonee number of the local authority or voluntary organisation?
What is the telephone number of the local authority or voluntary organisation?
</h1>

<form class="form" action="#" method="post">


<div class="govuk-form-group">
Expand All @@ -38,13 +37,12 @@ <h1 class="govuk-heading-l">
<input class="govuk-input govuk-input--width-10 govuk-input--extra-letter-spacing" id="national-insurance-number" name="nationalInsuranceNumber" type="text" spellcheck="false" aria-describedby="national-insurance-number-hint">
</div>

<form class="form" action="#" method="post">
<form class="form" action="/end-screen" method="post">
{{ govukButton({
text: " Save and Continue"
}) }}

{{ govukButton({
text: " Save and Continue"
}) }}

</form>
</form>

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
Question page template – {{ serviceName }} – GOV.UK Prototype Kit
Name of organisation – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}
Expand All @@ -21,7 +21,7 @@
{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<div class="govuk-grid-column-two-thirds">

<h1 class="govuk-heading-l">
What is the name of the local authority or voluntary organisation?
Expand All @@ -33,12 +33,10 @@ <h1 class="govuk-heading-l">
</div>


<form class="form" action="#" method="post">
{{ govukButton({
text: " Save and Continue"
}) }}

</form>
{{ govukButton({
text: " Save and Continue",
href: "la-address"
}) }}

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
Question page template – {{ serviceName }} – GOV.UK Prototype Kit
Relationship – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}
Expand All @@ -21,10 +21,10 @@
{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<div class="govuk-grid-column-two-thirds">

<h1 class="govuk-heading-l">
What is your relationship to them?
What is your relationship to the child?
</h1>

<div class="govuk-form-group">
Expand All @@ -33,12 +33,12 @@ <h1 class="govuk-heading-l">
</div>


<form class="form" action="#" method="post">
{{ govukButton({
text: " Save and Continue"
}) }}
<form class="form" action="/end-screen" method="post">
{{ govukButton({
text: " Save and Continue"
}) }}

</form>
</form>

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
Question page template – {{ serviceName }} – GOV.UK Prototype Kit
When placed – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}
Expand All @@ -21,7 +21,7 @@
{% block content %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<div class="govuk-grid-column-two-thirds">

<div class="govuk-form-group">
<fieldset class="govuk-fieldset" role="group" aria-describedby="dob-hint">
Expand All @@ -31,7 +31,7 @@ <h1 class="govuk-fieldset__heading">
</h1>
</legend>
<div id="dob-hint" class="govuk-hint">
For example, 31 3 1980
For example, 31 3 2024
</div>
<div class="govuk-date-input" id="dob">
<div class="govuk-date-input__item">
Expand Down Expand Up @@ -61,12 +61,10 @@ <h1 class="govuk-fieldset__heading">
</div>
</fieldset>
</div>
<form class="form" action="#" method="post">
{{ govukButton({
text: " Save and Continue"
}) }}

</form>
{{ govukButton({
text: " Save and Continue",
href: "who-placed"
}) }}

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
Question page template – {{ serviceName }} – GOV.UK Prototype Kit
Who placed – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}
Expand All @@ -27,31 +27,30 @@ <h1 class="govuk-heading-l">
Who placed the child into your care?
</h1>

<form class="form" action="/path/of/next/page" method="post">
<form class="form" method="post">

<div class="govuk-radios govuk-radios" data-module="govuk-radios">
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changedName" name="changedName" type="radio" value="yes">
<label class="govuk-label govuk-radios__label" for="changedName">
<input class="govuk-radios__input" id="who-placed" name="who-placed" type="radio" value="parent">
<label class="govuk-label govuk-radios__label" for="who-placed">
A parent of the child
</label>
</div>
<div class="govuk-radios__item">
<input class="govuk-radios__input" id="changedName-2" name="changedName" type="radio" value="no">
<label class="govuk-label govuk-radios__label" for="changedName-2">
<input class="govuk-radios__input" id="who-placed-2" name="who-placed" type="radio" value="la">
<label class="govuk-label govuk-radios__label" for="who-placed-2">
A local authority or voluntary organisation
</label>
</div>

</form>



</div>

<br>
<br>
<form class="form" action="#" method="post">
<button type="submit" class="govuk-button" data-module="govuk-button"><a href="part-1/child-name"></a>
<button type="submit" class="govuk-button" data-module="govuk-button">
Save and continue
</button>
</form>
Expand Down