Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1cde424
Updated to use new rebrand
christophercameron-ixd Oct 16, 2025
1f32d00
Fix for service navigation to align with prod
christophercameron-ixd Oct 16, 2025
c54ec68
Update packages
christophercameron-ixd Oct 16, 2025
a207742
Changed header to use new service navigation
christophercameron-ixd Oct 16, 2025
2a54361
Fixed back link content
christophercameron-ixd Oct 16, 2025
c6bafc3
Fixed back link content and spacing
christophercameron-ixd Oct 16, 2025
7af6d9b
Created new receive CSV file task page
christophercameron-ixd Oct 16, 2025
4778f63
Created new share preview task page
christophercameron-ixd Oct 16, 2025
5bb962a
Updated screen to match a group landing page
christophercameron-ixd Oct 16, 2025
87f7b26
Back link and page content alignment with prod
christophercameron-ixd Oct 16, 2025
4335486
Updated task list page with missing tasks and other content fixes
christophercameron-ixd Oct 16, 2025
48f12b7
Content alignment with prod
christophercameron-ixd Oct 16, 2025
14f6bfe
Small change to add for to hidden text
christophercameron-ixd Oct 16, 2025
bd2c8e6
Created new change group page
christophercameron-ixd Oct 16, 2025
879e10a
Custom styling for Welsh translation screen
christophercameron-ixd Oct 20, 2025
7eb9334
New Welsh translation screen - first version
christophercameron-ixd Oct 20, 2025
96cdf0e
Minor changes to add a save button and trying to explore input sizing
christophercameron-ixd Oct 21, 2025
d3262ed
Fix content width
christophercameron-ixd Oct 21, 2025
3fd0d25
Add Welsh optional section and link
christophercameron-ixd Oct 21, 2025
183a63c
Added more complete data for return form
christophercameron-ixd Oct 21, 2025
4876294
Updated content to match mural board
christophercameron-ixd Oct 21, 2025
fd84ec2
Moved if statements to cover input sets
christophercameron-ixd Oct 21, 2025
f683c83
Removed unused default data
christophercameron-ixd Oct 22, 2025
c149c0e
Height added so textareas take up full table cell
christophercameron-ixd Oct 22, 2025
94097b6
Example WHN information from existing form
christophercameron-ixd Oct 22, 2025
69084aa
Formatting fix and Welsh link content added
christophercameron-ixd Oct 22, 2025
33fea0f
Simple route for adding Welsh content
christophercameron-ixd Oct 22, 2025
5654689
Added form element to trigger route and removed unused success banner
christophercameron-ixd Oct 22, 2025
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
51 changes: 51 additions & 0 deletions app/assets/sass/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,55 @@ Summary card
// Payment Link confirmation panel
.app-panel-blue {
background-color: #1d70b8;
}

// Service navigation
@media (min-width: 40.0625em) {
.app-service-navigation li:nth-last-child(2) {
flex: 1 0 auto;
text-align: right;
}
}

// Welsh version translation screen
.app-translate-table {
border: 2px solid #dee0e2;
height: 100%;

.govuk-table__head {
background-color: #dee0e2;
}

.app-table-half-width {
width: 50%;
}

.app-table-one-third-width {
width: 37.5%;
}

.app-table-one-quarter-width {
width: 25%;
}

.govuk-table__header,
.govuk-table__cell {
border: 2px solid #dee0e2;
padding: 5px;
}

.app-table__cell-input {
padding: 0;
}

.app-welsh-form-group {
margin: 0;
height: 100%;
.govuk-input,
.govuk-textarea {
min-height: 100%; // use min-height so the textarea can't be smaller than the container
border: 0;
margin: 0;
}
}
}
9 changes: 8 additions & 1 deletion app/config.json
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
{"serviceName":"GOV.UK Forms"}
{
"serviceName":"GOV.UK Forms",
"plugins": {
"govuk-frontend": {
"rebrand": true
}
}
}
102 changes: 102 additions & 0 deletions app/data/example-form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/*

This is an example of a complete form - not made live

*/

module.exports = {
"id": 1,
"form_id": 1313,
"tag": "draft",
"content": {
"name": 'What a wonderful test form',
"steps": [
{
"pageIndex": "0",
"data": {
"hint_text": "",
"answer_type": "name",
"is_optional": null,
"page_heading": null,
"question_text": "What is your name?",
"answer_settings": {
"input_type": "full_name",
"title_needed": "false"
},
"guidance_markdown": null
},
"type": "question_page",
"position": 1,
"routing_conditions": []
},
{
'long-title': 'What is your claim reference number?',
'short-title': 'Claim reference number',
'hint-text': 'Begins with LN',
type: 'text',
pageIndex: '1'
},
{
'long-title': 'What is your National Insurance number?',
'short-title': 'National Insurance number',
'hint-text': 'It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’.',
type: 'text',
pageIndex: '2'
},
{
'long-title': 'What is the name of the company?',
'short-title': 'Company name',
type: 'text',
pageIndex: '3'
},
{
'long-title': 'When did your leave year start?',
'short-title': 'Holiday start date',
'hint-text': 'For example 27 3 2007',
type: 'date',
pageIndex: '4'
},
{
'long-title': 'How many holiday days were you entitled to for the full leave year?',
'short-title': 'Leave days entitled to',
'hint-text': 'Include bank holidays',
type: 'number',
pageIndex: '5'
},
{
'long-title': 'How many holiday days did you take between the date your leave year started and the date you were made redundant?',
'short-title': 'Leave days taken',
'hint-text': 'Include any bank holidays that happened during this time',
type: 'number',
pageIndex: '6'
},
{
'long-title': 'How many days did you carry over from your last leave year? ',
'short-title': 'Days carried over from previous year',
'hint-text': 'If you did not carry over any days enter ‘0’',
type: 'number',
pageIndex: '7'
}
]
},
"question_section_completed": true,

"declaration_text": null,
"declaration_section_completed": true,

"what_happens_next_markdown": "We will update your claim with the new information you provided. We aim to do this within 10 working days. After we have updated your information, we will let you know if you are due a payment. You do not need to send us any further evidence to complete your application.\n\nIf you have not had a response from us within 15 working days, contact us at: [[email protected]](mailto:[email protected])\n\nMake sure you have told the insolvency practitioner handling your employer’s insolvency about the changes you have made to your claim information. They may need to change the information they provided the Insolvency Service.\n\nTo make another amendment to your redundancy claim, complete the relevant form from the [redundancy claim amendment forms](https://www.gov.uk/guidance/amend-a-redundancy-claim) page.",

"payment_url": null,

"submission_type": 'email', // or 'email_with_csv'
"submission_email": '',

"privacy_policy_url": null,

"support_email": null,
"support_phone": null,
"support_url": null,
"support_url_text": null,

"share_preview_completed": false
}
24 changes: 17 additions & 7 deletions app/data/returning-session-data-defaults-a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ Example usage:
module.exports = {
highestPageId: 6,
action: 'gogogo',
publish: 'GOV.UK',
authentication: 'email',
payments: 'no',
formTitle: 'Take your pet abroad',
status: 'Draft',
pages: [
{
'long-title': 'What type of animal is your pet?',
Expand Down Expand Up @@ -65,9 +64,20 @@ module.exports = {
pageIndex: '5'
}
],
status: 'Draft',
isQuestionsComplete: 'no',

checkAnswersDeclaration: '',

confirmationNext: 'We will update your claim with the new information you provided. We aim to do this within 10 working days. After we have updated your information, we will let you know if you are due a payment. You do not need to send us any further evidence to complete your application.\n\nIf you have not had a response from us within 15 working days, contact us at: [[email protected]](mailto:[email protected])\n\nMake sure you have told the insolvency practitioner handling your employer’s insolvency about the changes you have made to your claim information. They may need to change the information they provided the Insolvency Service.\n\nTo make another amendment to your redundancy claim, complete the relevant form from the [redundancy claim amendment forms](https://www.gov.uk/guidance/amend-a-redundancy-claim) page.',

payments: 'no',

supportDetails: [
'phone'
],

phoneSupport: 'Phone: 020 7946 0101\n\nMonday to Friday, 9am to 5pm (except public holidays)',

confirmationTitle: 'Your form has been submitted',
checkAnswersTitle: 'Check your answers before submitting your form',
formTitle: 'Take your pet abroad',
isQuestionsComplete: 'no'
checkAnswersTitle: 'Check your answers before submitting your form'
}
2 changes: 0 additions & 2 deletions app/data/returning-session-data-defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Example usage:
module.exports = {
highestPageId: 6,
action: 'gogogo',
publish: 'GOV.UK',
authentication: 'email',
payments: 'no',
pages: [
{
Expand Down
2 changes: 0 additions & 2 deletions app/data/session-data-defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ module.exports = {

highestPageId: 0,
action: '',
publish: 'GOV.UK',
authentication: 'email',
payments: 'no',
pages: [],
status: 'Draft',
Expand Down
16 changes: 16 additions & 0 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,22 @@ router.post('/form-designer/provide-support-details', function (req, res) {
}
})

/* =====
Create a Welsh version of your form (optional)
===== */

// Routing for adding Welsh version
router.post('/form-designer/welsh/add-welsh-version', function (req, res) {
var { welshFormName } = req.session.data

if (welshFormName) {
// set a success message for saving
req.session.data.successMessage = 'Your Welsh version has been saved'
}

return res.redirect('../your-form')
})


/* =====
Make your form live
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% block beforeContent %}
<a class="govuk-back-link" href="../your-form" target="_parent">
Back to create a form
Back to create your form
</a>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% block beforeContent %}
<a class="govuk-back-link" href="../your-form" target="_parent">
Back to create a form
Back to create your form
</a>
{% endblock %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% block beforeContent %}
<a class="govuk-back-link" href="../your-form" target="_parent">
Back to create a form
Back to create your form
</a>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion app/views/form-designer/delete-draft-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% endblock %}

{% block beforeContent %}
<a class="govuk-back-link" href="your-form">Back to create a form</a>
<a class="govuk-back-link" href="your-form">Back to create your form</a>
{% endblock %}

{% block content %}
Expand Down
73 changes: 73 additions & 0 deletions app/views/form-designer/groups/move-form-group.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{% extends "layout-govuk-forms.html" %}

{% set pageTitle = 'Move this form to a different group' %}

{% block pageTitle %}
{{ "Error: " if containsErrors }}{{ pageTitle }} - GOV.UK Forms
{% endblock %}

{% block beforeContent %}
<a class="govuk-back-link" href="../your-forms">Back to your forms</a>
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<form class="form" method="post" novalidate>

{% if containsErrors %}
{{ govukErrorSummary({
titleText: "There is a problem",
errorList: errorList
}) }}
{% endif %}

<span class="govuk-caption-l">{{ data['formTitle'] or '[formTitle]' }}</span>
<h1 class="govuk-heading-l">{{ data['groupName'] or 'Your test forms' }}</h1>

{{ govukSummaryList({
classes: "govuk-summary-list--no-border",
rows: [
{
key: {
text: "Form name"
},
value: {
text: data['formTitle'] or '[formTitle]'
}
},
{
key: {
text: "Current group"
},
value: {
text: data['groupName'] or 'Your test group'
}
}
]
}) }}

<p class="govuk-body">
We’ll send an email to members of the current group to let them know the form has moved and they may no longer have access to it.
</p>

{{ govukInput({
label: {
text: pageTitle,
classes: "govuk-label--m",
isPageHeading: false
},
id: "move-group",
name: "moveGroup",
value: data['moveGroup'],
errorMessage: { text: errors['moveGroup'].text } if errors['moveGroup'].text
}) }}

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

</form>
</div>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion app/views/form-designer/make-your-form-live.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% block beforeContent %}
<a class="govuk-back-link" href="your-form" target="_parent">
Back to create a form
Back to create your form
</a>
{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions app/views/form-designer/pages/check-answers/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% if prevPageId > 0 %}
<a class="govuk-back-link" href="{{prevPageId}}">Back</a>
{% else %}
<a class="govuk-back-link" href="../../your-form" target="_parent">Back to create a form</a>
<a class="govuk-back-link" href="../../your-form" target="_parent">Back to create your form</a>
{% endif %}
{% endblock %}

Expand Down Expand Up @@ -46,7 +46,7 @@ <h1 class="govuk-heading-l">{{ pageTitle }}</h1>
{% set pagePrefix = "p" + pageId + "-" %}

<p class="govuk-body">
When someone has answered all the questions in your form, they’ll be shown a page that lists all their answers. The page will ask them to check their answers before they submit the form.
When someone has answered all the questions in your form, they’ll be shown a page that lists all of their answers. The page will ask them to check their answers before they submit the form.
</p>

<p class="govuk-body">
Expand Down
Loading