/
violenceRating.html
114 lines (104 loc) · 2.82 KB
/
violenceRating.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{% extends "../formTemplate.html" %}
{% from "warning-text/macro.njk" import govukWarningText %}
{% from "textarea/macro.njk" import govukTextarea %}
{% from "radios/macro.njk" import govukRadios %}
{% set highRiskOfViolenceTextHtml %}
{{ govukTextarea({
name: "highRiskOfViolenceText",
type: "highRiskOfViolenceText",
id: "highRiskOfViolenceText",
label: {
text: "Give details of this evidence"
},
value: data.highRiskOfViolenceText,
errorMessage: {
text: "Please enter details"
} if (errors | findError('highRiskOfViolenceText'))
}) }}
{% endset %}
{% set seriousThreatTextHtml %}
{{ govukTextarea({
name: "seriousThreatText",
type: "seriousThreatText",
id: "seriousThreatText",
label: {
text: "Give details of this evidence"
},
value: data.seriousThreatText,
errorMessage: {
text: "Please enter details"
} if (errors | findError('seriousThreatText'))
}) }}
{% endset %}
{% block formItems %}
<h1 class="govuk-heading-l">Violence rating</h1>
{% if data.violenceProfile.veryHighRiskViolentOffender %}
{{ govukWarningText({
text: "Violent in custody Text TBC",
iconFallbackText: "Warning",
classes: "forms-warning-text warning-overrides"
}) }}
{% endif %}
{{ govukRadios({
name: "highRiskOfViolence",
classes: "govuk-radios--inline",
fieldset: {
legend: {
text: "Is there any other evidence to suggest that the person poses a high risk of violence in custody?",
isPageHeading: false
}
},
errorMessage: {
text: "Please select yes or no"
} if (errors | findError('highRiskOfViolence')),
items: [
{
value: "Yes",
text: "Yes",
checked: data.highRiskOfViolence === 'Yes',
conditional: {
html: highRiskOfViolenceTextHtml
}
},
{
value: "No",
checked: data.highRiskOfViolence === 'No',
text: "No"
}
]
}) }}
{{ govukRadios({
name: "seriousThreat",
classes: "govuk-radios--inline",
fieldset: {
legend: {
text: "Is there any other evidence to indicate that the person represents a serious threat to control, good order or discipline?",
isPageHeading: false
}
},
errorMessage: {
text: "Please select yes or no"
} if (errors | findError('seriousThreat')),
items: [
{
value: "Yes",
text: "Yes",
checked: data.seriousThreat === 'Yes',
conditional: {
html: seriousThreatTextHtml
}
},
{
value: "No",
checked: data.seriousThreat === 'No',
text: "No"
}
]
}) }}
{% endblock %}
{#
coming back from risk profiler:
private boolean veryHighRiskViolentOffender;
private boolean notifySafetyCustodyLead;
private boolean displayAssaults;
#}