Skip to content
121 changes: 121 additions & 0 deletions app/views/record-vaccinations/location-a.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{% extends 'layout.html' %}

{% set pageName = "Where is the vaccination taking place?" %}

{% set currentSection = "vaccinate" %}

{% block beforeContent %}
{{ backLink({ href: "/record-vaccinations/eligibility" }) }}
{% endblock %}

{% block content %}
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">

{% set errorList = [] %}
{% for error in errors %}
{% if error.code == "required" %}
{% set errorList = (errorList.push({
text: "Select where the vaccination is taking place",
href: error.href
}), errorList) %}
{% endif %}
{% endfor %}

{% if (errorList | length) > 0 %}
{{ errorSummary({
titleText: "There is a problem",
errorList: errorList
}) }}
{% endif %}

<form action="/record-vaccinations/answer-location" method="post" novalidate>
{% set careHtml %}

<div class="nhsuk-form-group">
<label class="nhsuk-label nhsuk-label--s" for="careHomeId">
Care home details
</label>
<div class="nhsuk-hint" id="care-home-hint">
Search by name or ODS code
</div>
<select class="nhsuk-select" id="careHomeId" name="careHomeId"
aria-describedby="care-home-hint" data-autoselect="" data-display-menu="" data-min-length="" data-show-all-values="" data-show-no-options-found="">
<option {% if not data.caeHome %}selected{% endif %} value=""></option>

{% set options = [] %}

{% for careHome in careHomes %}
{% set options = (options.push({
label: careHome.name + ", " + careHome.address + " (" + careHome.id + ")",
value: careHome.id
}), options) %}
{% endfor %}

{% for option in (options | sort(false, true, "label")) %}
<option value="{{ option.value }}" {% if data.careHomeId == option.value %}selected{%endif %}>{{ option.label }}</option>
{% endfor %}

</select>
</div>
{% endset -%}


{{ radios({
idPrefix: "location-type",
name: "locationType",
fieldset: {
legend: {
text: ("Where is the vaccination taking place?" if data.vaccinationToday == 'yes' else "Where did the vaccination take place?"),
size: "l",
isPageHeading: true
}
},
hint: {
text: "This is needed for payment and reporting."
},
errorMessage: {
text: (errorList | first).text
} if (errorList | length) > 0,
value: data.locationType,
items: [
{
text: "On site",
value: "On site",
hint: {
text: "Includes: hospital hubs, vaccination centres, Primary Care Networks (PCNs), pharmacies, GP surgeries and detained settings"
}
},
{
value: "Care home",
text: "Care home",
conditional: {
html: careHtml
}
},
{
text: "Housebound patient’s home",
value: "Housebound patient’s home"
},
{
text: "Outreach event",
value: "Outreach event"
}
]

}) }}


{{ button({
text: "Continue"
})}}


</form>


</div>
</div>

{% endblock %}

139 changes: 139 additions & 0 deletions app/views/record-vaccinations/location-b.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{% extends 'layout.html' %}

{% set pageName = "Where is the vaccination taking place?" %}

{% set currentSection = "vaccinate" %}

{% block beforeContent %}
{{ backLink({ href: "/record-vaccinations/eligibility" }) }}
{% endblock %}

{% block content %}
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-two-thirds">

{% from "details/macro.njk" import details %}

{% set details %}

<details class="nhsuk-details">
<summary class="nhsuk-details__summary">
<span class="nhsuk-details__summary-text">
Help with location
</span>
</summary>
<div class="nhsuk-details__text">
<p>On site includes:</p>
<ul>
<li>hospital hubs</li>
<li>vaccination centres</li>
<li>Primary Care Networks (PCNs)</li>
<li>pharmacies</li>
<li>GP surgeries</li>
<li>detained settings</li>
</ul>
</div>
</details>
{% endset %}

{% set errorList = [] %}
{% for error in errors %}
{% if error.code == "required" %}
{% set errorList = (errorList.push({text: "Select where the vaccination is taking place", href: error.href}), errorList) %}
{% endif %}
{% endfor %}

{% if (errorList | length) > 0 %}
{{ errorSummary({
titleText: "There is a problem",
errorList: errorList
}) }}
{% endif %}

<form action="/record-vaccinations/answer-location" method="post" novalidate>
{% set careHtml %}

<div class="nhsuk-form-group">
<label class="nhsuk-label nhsuk-label--s" for="careHomeId">
Care home details
</label>
<div class="nhsuk-hint" id="care-home-hint">
Search by name or ODS code
</div>
<select class="nhsuk-select" id="careHomeId" name="careHomeId"
aria-describedby="care-home-hint" data-autoselect="" data-display-menu="" data-min-length="" data-show-all-values="" data-show-no-options-found="">
<option {% if not data.caeHome %}selected{% endif %} value=""></option>

{% set options = [] %}

{% for careHome in careHomes %}
{% set options = (options.push({
label: careHome.name + ", " + careHome.address + " (" + careHome.id + ")",
value: careHome.id
}), options) %}
{% endfor %}

{% for option in (options | sort(false, true, "label")) %}
<option value="{{ option.value }}" {% if data.careHomeId == option.value %}selected{%endif %}>{{ option.label }}</option>
{% endfor %}

</select>
</div>
{% endset -%}

{{ radios({
idPrefix: "location-type",
name: "locationType",
formGroup: {
beforeInputs: {
html: details
}
},
fieldset: {
legend: {
text: ("Where is the vaccination taking place?" if data.vaccinationToday == 'yes' else "Where did the vaccination take place?"),
size: "l",
isPageHeading: true
}
},
hint: {
text: "This is needed for payment and reporting."
},
errorMessage: {
text: (errorList | first).text
} if (errorList | length) > 0,
value: data.locationType,
items: [
{
text: "On site",
value: "On site"
},
{
value: "Care home",
text: "Care home",
conditional: {
html: careHtml
}
},
{
text: "Housebound patient’s home",
value: "Housebound patient’s home"
},
{
text: "Outreach event",
value: "Outreach event"
}
]

}) }}

{{ button({
text: "Continue"
})}}

</form>

</div>
</div>

{% endblock %}
1 change: 0 additions & 1 deletion app/views/record-vaccinations/location.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,3 @@
</div>

{% endblock %}