Skip to content

Commit 24af4e2

Browse files
authored
RA-274: add forward application njk template (#36)
* add forward application njk template * add trailing newline
1 parent 1613fcd commit 24af4e2

File tree

2 files changed

+64
-1
lines changed

2 files changed

+64
-1
lines changed

server/routes/applications/viewApplicationsRoutes.ts

+7
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,12 @@ export default function viewApplicationRoutes({
9090
}),
9191
)
9292

93+
router.post(
94+
'/applications/:departmentName/:prisonerId/:applicationId/forward',
95+
asyncMiddleware(async (req: Request, res: Response) => {
96+
res.redirect(``)
97+
}),
98+
)
99+
93100
return router
94101
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{%- from "moj/components/sub-navigation/macro.njk" import mojSubNavigation -%}
2+
3+
{% from "govuk/components/button/macro.njk" import govukButton %}
4+
{% from "govuk/components/character-count/macro.njk" import govukCharacterCount %}
25
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %}
6+
{% from "govuk/components/radios/macro.njk" import govukRadios %}
37

48
{% extends "../../partials/layout.njk" %}
59

@@ -8,6 +12,58 @@
812

913
{% block content %}
1014
<div class="govuk-body govuk-width-container govuk-!-padding-top-5 govuk-!-padding-bottom-5">
11-
<h1 class="govuk-heading-xl govuk-!-margin-top-0">Forward this application to</h1>
15+
<div class="govuk-grid-row">
16+
<div class="govuk-grid-column-one-half">
17+
<h1 class="govuk-heading-xl govuk-!-margin-top-0">Forward this application to swap VO's</h1>
18+
19+
<form method="POST" id="forward-application-form">
20+
<input type="hidden" name="_csrf" value="{{ csrfToken }}" />
21+
22+
{{ govukRadios({
23+
name: "forwardToDepartment",
24+
fieldset: {
25+
legend: {
26+
text: "Send to:"
27+
}
28+
},
29+
items: [
30+
{
31+
value: "activities",
32+
text: "Activities"
33+
},
34+
{
35+
value: "chaplaincy",
36+
text: "Chaplaincy"
37+
},
38+
{
39+
value: "education",
40+
text: "Education"
41+
}
42+
]
43+
}) }}
44+
45+
{{ govukCharacterCount({
46+
name: "forwardingReason",
47+
id: "forwarding-reason",
48+
maxlength: 1000,
49+
threshold: 75,
50+
value: textareaValue,
51+
label: {
52+
text: "Reason for forwarding (optional)",
53+
classes: "govuk-label--s",
54+
isPageHeading: true
55+
},
56+
hint: {
57+
text: "This is added to the comments section for other staff to see"
58+
}
59+
}) }}
60+
61+
{{ govukButton({
62+
text: "Continue",
63+
classes: "govuk-button--primary"
64+
}) }}
65+
</form>
66+
</div>
67+
</div>
1268
</div>
1369
{% endblock %}

0 commit comments

Comments
 (0)