|
44 | 44 | "Healthcare worker not covered by national criteria" |
45 | 45 | ] %} |
46 | 46 |
|
| 47 | +{% set pneumococcalOver65Options = [ |
| 48 | + "Aged 65 and over" |
| 49 | +] %} |
| 50 | + |
| 51 | +{% set pneumococcalUnder65Options = [ |
| 52 | + "Heart disease", |
| 53 | + "Kidney disease", |
| 54 | + "Liver disease", |
| 55 | + "Respiratory disease", |
| 56 | + "Immunosuppressed", |
| 57 | + "Cochlear implants", |
| 58 | + "Diabetes" |
| 59 | +] %} |
| 60 | + |
| 61 | + |
47 | 62 | {% block content %} |
48 | 63 | <div class="nhsuk-grid-row"> |
49 | 64 | <div class="nhsuk-grid-column-two-thirds"> |
|
63 | 78 | {% set eligibilityOptions = NationalFluEligibilityOptions %} |
64 | 79 | {% elif data.vaccine == "RSV" %} |
65 | 80 | {% set eligibilityOptions = RSVEligibilityOptions %} |
| 81 | + {% elif data.vaccine == "pneumococcal" %} |
| 82 | + {% set eligibilityOptions = pneumococcalOver65Options %} |
66 | 83 | {% else %} |
67 | 84 | {% set eligibilityOptions = [] %} |
68 | 85 | {% endif %} |
|
71 | 88 | {% for option in eligibilityOptions %} |
72 | 89 | {% set items = (items.push({ |
73 | 90 | text: option, |
74 | | - value: option, |
75 | | - checked: (data.eligibility | arrayOrStringIncludes(option)) |
| 91 | + value: option |
76 | 92 | }), items) %} |
77 | 93 | {% endfor %} |
78 | 94 |
|
|
90 | 106 | {% for option in londonFluEligibilityOptions %} |
91 | 107 | {% set londonFluItems = (londonFluItems.push({ |
92 | 108 | text: option, |
93 | | - value: option, |
94 | | - checked: (data.eligibility | arrayOrStringIncludes(option)) |
| 109 | + value: option |
95 | 110 | }), londonFluItems) %} |
96 | 111 | {% endfor %} |
97 | 112 |
|
98 | 113 | {% set londonFluHtml %} |
99 | 114 | {{ radios({ |
100 | 115 | idPrefix: "eligibility-2", |
101 | 116 | name: "eligibility", |
102 | | - items: londonFluItems |
| 117 | + items: londonFluItems, |
| 118 | + value: data.eligibility |
103 | 119 | }) }} |
104 | 120 | {% endset %} |
105 | 121 |
|
|
117 | 133 |
|
118 | 134 | {% endif %} |
119 | 135 |
|
| 136 | + {% if data.vaccine == "pneumococcal" %} |
| 137 | + <h2 class="nhsuk-u-font-size-19 nhsuk-u-margin-bottom-2 nhsuk-u-margin-top-3 nhsuk-u-font-weight-normal">Aged 65 and over</h2> |
| 138 | + {% endif %} |
| 139 | + |
120 | 140 | {{ radios({ |
121 | 141 | idPrefix: "eligibility", |
122 | 142 | name: "eligibility", |
| 143 | + value: data.eligibility, |
123 | 144 | items: items |
124 | 145 | }) }} |
125 | 146 |
|
| 147 | + {% if data.vaccine == "pneumococcal" %} |
| 148 | + <h2 class="nhsuk-u-font-size-19 nhsuk-u-margin-bottom-2 nhsuk-u-margin-top-3 nhsuk-u-font-weight-normal">Aged 18 to 64 and in a clinical risk group</h2> |
| 149 | + |
| 150 | + {% set pneumococcalUnder64Items = [] %} |
| 151 | + {% for option in pneumococcalUnder65Options %} |
| 152 | + {% set pneumococcalUnder64Items = (pneumococcalUnder64Items.push({ |
| 153 | + text: option, |
| 154 | + value: option |
| 155 | + }), pneumococcalUnder64Items) %} |
| 156 | + {% endfor %} |
| 157 | + |
| 158 | + {{ radios({ |
| 159 | + idPrefix: "eligibility2", |
| 160 | + name: "eligibility", |
| 161 | + value: data.eligibility, |
| 162 | + items: pneumococcalUnder64Items |
| 163 | + }) }} |
| 164 | + {% endif %} |
| 165 | + |
126 | 166 | {% endcall %} |
127 | 167 |
|
128 | 168 | {{ button({ |
|
0 commit comments