From 1cde424497c90fc57f20d4191f6e3a3da8990f02 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:49:24 +0100 Subject: [PATCH 01/37] Updated to use new rebrand --- app/config.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/config.json b/app/config.json index 2b442caa..6506d68f 100644 --- a/app/config.json +++ b/app/config.json @@ -1 +1,8 @@ -{"serviceName":"GOV.UK Forms"} +{ + "serviceName":"GOV.UK Forms", + "plugins": { + "govuk-frontend": { + "rebrand": true + } + } +} From 1f32d00b661fc165b3ac1c702c630bb0c980142e Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:49:59 +0100 Subject: [PATCH 02/37] Fix for service navigation to align with prod --- app/assets/sass/application.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/sass/application.scss b/app/assets/sass/application.scss index b9511e9f..ffae036e 100644 --- a/app/assets/sass/application.scss +++ b/app/assets/sass/application.scss @@ -292,4 +292,12 @@ 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; + } } \ No newline at end of file From c54ec687e1fc0f472709f03193f10d7c4ba926b3 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:50:12 +0100 Subject: [PATCH 03/37] Update packages --- package-lock.json | 1051 +++++++++++++-------------------------------- 1 file changed, 296 insertions(+), 755 deletions(-) diff --git a/package-lock.json b/package-lock.json index c89d4ac6..5c0b05e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,9 +23,9 @@ "integrity": "sha512-VGk7dQhtAk9SvlsG5DPawAifRcM+aPHykH595zJomf8Upvn4DIIQfdLEDMHAr3b6d4BPpF5Cho5G5TGhyHXddg==" }, "node_modules/@govuk-prototype-kit/step-by-step": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@govuk-prototype-kit/step-by-step/-/step-by-step-2.2.2.tgz", - "integrity": "sha512-roFCAexAFP+ip2dIUi7o4QKDLak6nKcTFnMoh9jBEpKjpO6rjoU+xkgY3w9nqTy9rRGBtvIb+LaeoEZ78sd2KA==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@govuk-prototype-kit/step-by-step/-/step-by-step-2.2.3.tgz", + "integrity": "sha512-/UTle5BrANiWlcrgaaJgiOp61qQdKPU4VUuToQH63u10E+G/NK78x370NuxA78lO/NvXAh4gndt6SQdpy7r2+g==" }, "node_modules/@lfdebrux/nunjucks-markdown": { "version": "0.0.1", @@ -50,21 +50,6 @@ "proxy-from-env": "^1.1.0" } }, - "node_modules/axios/node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -164,9 +149,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "funding": [ { "type": "individual", @@ -182,6 +167,21 @@ } } }, + "node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -237,9 +237,9 @@ } }, "node_modules/govuk-frontend": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.2.0.tgz", - "integrity": "sha512-beD3wztHpkKz6JUpPwnwop1ejb4rTFMPLCutKLCIDmUS4BPpW59ggVUfctsRqHd2Zjw9wxljdRdeIJ8AZFyyTw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.13.0.tgz", + "integrity": "sha512-6N3pHelWN7wftdM6e4YEzZAfattapa1gnd+Al6d5PUbfTr9D+T2dnphpNpjX75CTEhihlQqlL0RDQ3WIfZ3PSg==", "engines": { "node": ">= 4.2.0" } @@ -268,11 +268,12 @@ } }, "node_modules/govuk-prototype-kit": { - "version": "13.18.0", - "resolved": "https://registry.npmjs.org/govuk-prototype-kit/-/govuk-prototype-kit-13.18.0.tgz", - "integrity": "sha512-zBGDoR/4rajVPtdRQf8L/6RuLSKWDp3rJxaXRZ2RYV3t9GYM1RMKXG0KEm0BY0Hv1GhcIGHjjWBolhXMzA1RdA==", + "version": "13.18.1", + "resolved": "https://registry.npmjs.org/govuk-prototype-kit/-/govuk-prototype-kit-13.18.1.tgz", + "integrity": "sha512-RvuJZs+S1J/JbtGQgqyyo9xd9hDJFJAZ6tieDHrXehadRgbgmZXJytlOlV1zcz5F92L3kJdNva09rTvh51On4g==", "hasShrinkwrap": true, "dependencies": { + "@inquirer/confirm": "^5.1.15", "ansi-colors": "^4.1.3", "body-parser": "^1.20.2", "browser-sync": "^3.0.2", @@ -286,7 +287,6 @@ "express-session": "^1.18.0", "fs-extra": "^11.2.0", "govuk-frontend": "5.11.0", - "inquirer": "^8.2.6", "lodash": "^4.17.21", "marked": "^4.3.0", "nodemon": "^3.0.3", @@ -307,6 +307,106 @@ "node": "^16.x || ^18.x || >= 20.x" } }, + "node_modules/govuk-prototype-kit/node_modules/@inquirer/confirm": { + "version": "5.1.15", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.15.tgz", + "integrity": "sha512-SwHMGa8Z47LawQN0rog0sT+6JpiL0B7eW9p1Bb7iCeKDGTI5Ez25TSc2l8kw52VV7hA4sX/C78CGkMrKXfuspA==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.1.15", + "@inquirer/type": "^3.0.8" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/govuk-prototype-kit/node_modules/@inquirer/core": { + "version": "10.1.15", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.15.tgz", + "integrity": "sha512-8xrp836RZvKkpNbVvgWUlxjT4CraKk2q+I3Ksy+seI2zkcE+y6wNs1BVhgcv8VyImFecUhdQrYLdW32pAjwBdA==", + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^2.0.0", + "signal-exit": "^4.1.0", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/govuk-prototype-kit/node_modules/@inquirer/core/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/govuk-prototype-kit/node_modules/@inquirer/core/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/govuk-prototype-kit/node_modules/@inquirer/figures": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", + "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/govuk-prototype-kit/node_modules/@inquirer/type": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", + "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/govuk-prototype-kit/node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -666,11 +766,12 @@ } }, "node_modules/govuk-prototype-kit/node_modules/@types/node": { - "version": "18.18.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.7.tgz", - "integrity": "sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ==", + "version": "22.17.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.17.2.tgz", + "integrity": "sha512-gL6z5N9Jm9mhY+U2KXZpteb+09zyffliRkZyZOHODGATyC5B1Jt/7TzuuiLkFsSUMLbS1OLmlj/E+/3KF4Q/4w==", + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.21.0" } }, "node_modules/govuk-prototype-kit/node_modules/@types/qs": { @@ -821,25 +922,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/govuk-prototype-kit/node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/govuk-prototype-kit/node_modules/base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", @@ -862,34 +944,6 @@ "node": ">=8" } }, - "node_modules/govuk-prototype-kit/node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/govuk-prototype-kit/node_modules/bl/node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/govuk-prototype-kit/node_modules/bl/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/govuk-prototype-kit/node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", @@ -1049,29 +1103,6 @@ "resolved": "https://registry.npmjs.org/bs-recipes/-/bs-recipes-1.3.4.tgz", "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=" }, - "node_modules/govuk-prototype-kit/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/govuk-prototype-kit/node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1134,11 +1165,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/govuk-prototype-kit/node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" - }, "node_modules/govuk-prototype-kit/node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -1170,34 +1196,13 @@ "node": ">=6" } }, - "node_modules/govuk-prototype-kit/node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/govuk-prototype-kit/node_modules/cli-spinners": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", - "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/govuk-prototype-kit/node_modules/cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "license": "ISC", "engines": { - "node": ">= 10" + "node": ">= 12" } }, "node_modules/govuk-prototype-kit/node_modules/cliui": { @@ -1210,14 +1215,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/govuk-prototype-kit/node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "engines": { - "node": ">=0.8" - } - }, "node_modules/govuk-prototype-kit/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1406,17 +1403,6 @@ "ms": "2.0.0" } }, - "node_modules/govuk-prototype-kit/node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/govuk-prototype-kit/node_modules/del": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", @@ -1710,14 +1696,6 @@ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, - "node_modules/govuk-prototype-kit/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/govuk-prototype-kit/node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -1952,19 +1930,6 @@ "node": ">= 0.8" } }, - "node_modules/govuk-prototype-kit/node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/govuk-prototype-kit/node_modules/fast-fifo": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.2.0.tgz", @@ -1993,20 +1958,6 @@ "reusify": "^1.0.4" } }, - "node_modules/govuk-prototype-kit/node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/govuk-prototype-kit/node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -2407,25 +2358,6 @@ "node": ">=0.10.0" } }, - "node_modules/govuk-prototype-kit/node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/govuk-prototype-kit/node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -2470,44 +2402,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "node_modules/govuk-prototype-kit/node_modules/inquirer": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", - "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", - "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^6.0.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/govuk-prototype-kit/node_modules/inquirer/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/govuk-prototype-kit/node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -2554,14 +2448,6 @@ "node": ">=0.10.0" } }, - "node_modules/govuk-prototype-kit/node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "engines": { - "node": ">=8" - } - }, "node_modules/govuk-prototype-kit/node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2595,17 +2481,6 @@ "node": ">=8" } }, - "node_modules/govuk-prototype-kit/node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/govuk-prototype-kit/node_modules/is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", @@ -2658,21 +2533,6 @@ "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=" }, - "node_modules/govuk-prototype-kit/node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/govuk-prototype-kit/node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -2770,14 +2630,6 @@ "node": ">= 0.6" } }, - "node_modules/govuk-prototype-kit/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "engines": { - "node": ">=6" - } - }, "node_modules/govuk-prototype-kit/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2801,9 +2653,13 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "node_modules/govuk-prototype-kit/node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } }, "node_modules/govuk-prototype-kit/node_modules/negotiator": { "version": "0.6.3", @@ -2981,20 +2837,6 @@ "wrappy": "1" } }, - "node_modules/govuk-prototype-kit/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/govuk-prototype-kit/node_modules/opn": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", @@ -3006,36 +2848,6 @@ "node": ">=4" } }, - "node_modules/govuk-prototype-kit/node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/govuk-prototype-kit/node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/govuk-prototype-kit/node_modules/p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", @@ -3282,18 +3094,6 @@ "node": ">= 0.8.0" } }, - "node_modules/govuk-prototype-kit/node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/govuk-prototype-kit/node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -3336,14 +3136,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/govuk-prototype-kit/node_modules/run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/govuk-prototype-kit/node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -3371,14 +3163,6 @@ "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" }, - "node_modules/govuk-prototype-kit/node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dependencies": { - "tslib": "^2.1.0" - } - }, "node_modules/govuk-prototype-kit/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -3755,11 +3539,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/govuk-prototype-kit/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, "node_modules/govuk-prototype-kit/node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", @@ -4071,22 +3850,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" }, - "node_modules/govuk-prototype-kit/node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "node_modules/govuk-prototype-kit/node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/govuk-prototype-kit/node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -4118,11 +3881,6 @@ "nodetouch": "bin/nodetouch.js" } }, - "node_modules/govuk-prototype-kit/node_modules/tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" - }, "node_modules/govuk-prototype-kit/node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -4175,9 +3933,10 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" }, "node_modules/govuk-prototype-kit/node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "license": "MIT" }, "node_modules/govuk-prototype-kit/node_modules/universal-analytics": { "version": "0.5.3", @@ -4269,14 +4028,6 @@ "node": ">= 0.8" } }, - "node_modules/govuk-prototype-kit/node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dependencies": { - "defaults": "^1.0.3" - } - }, "node_modules/govuk-prototype-kit/node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -4374,6 +4125,18 @@ "node": ">=12" } }, + "node_modules/govuk-prototype-kit/node_modules/yoctocolors-cjs": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -4411,9 +4174,9 @@ } }, "node_modules/highlight.js": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", - "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==", + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", + "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", "engines": { "node": ">=12.0.0" } @@ -4444,17 +4207,12 @@ "npm": ">=6" } }, - "node_modules/jsonwebtoken/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, "node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", + "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", "dependencies": { - "buffer-equal-constant-time": "1.0.1", + "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } @@ -4503,17 +4261,6 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -4552,13 +4299,18 @@ "node": ">= 0.6" } }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/notifications-node-client": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/notifications-node-client/-/notifications-node-client-8.0.0.tgz", - "integrity": "sha512-65BxorFYVFOpJ9c2lud/4Ju+Bfn3L/vkih+FuzMhBw1wcOPjwgu4doVH6xO91fHYiAi/0uIx0Mc+NorXeANMHw==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/notifications-node-client/-/notifications-node-client-8.2.1.tgz", + "integrity": "sha512-wyZh/NbjN8S2uQX18utYtCyC726BBaGeTc4HeUpdhZv5sYKuaQY94N31v9syh8SzVgehyMzW37y08EePmi+k3Q==", "dependencies": { - "axios": "^1.6.1", - "jsonwebtoken": "^9.0.0" + "axios": "^1.7.2", + "jsonwebtoken": "^9.0.2" }, "engines": { "node": ">=14.17.3", @@ -4590,23 +4342,15 @@ ] }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "bin": { "semver": "bin/semver.js" }, "engines": { "node": ">=10" } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } }, "dependencies": { @@ -4616,9 +4360,9 @@ "integrity": "sha512-VGk7dQhtAk9SvlsG5DPawAifRcM+aPHykH595zJomf8Upvn4DIIQfdLEDMHAr3b6d4BPpF5Cho5G5TGhyHXddg==" }, "@govuk-prototype-kit/step-by-step": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@govuk-prototype-kit/step-by-step/-/step-by-step-2.2.2.tgz", - "integrity": "sha512-roFCAexAFP+ip2dIUi7o4QKDLak6nKcTFnMoh9jBEpKjpO6rjoU+xkgY3w9nqTy9rRGBtvIb+LaeoEZ78sd2KA==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@govuk-prototype-kit/step-by-step/-/step-by-step-2.2.3.tgz", + "integrity": "sha512-/UTle5BrANiWlcrgaaJgiOp61qQdKPU4VUuToQH63u10E+G/NK78x370NuxA78lO/NvXAh4gndt6SQdpy7r2+g==" }, "@lfdebrux/nunjucks-markdown": { "version": "git+ssh://git@github.com/lfdebrux/govuk-prototype-kit-nunjucks-markdown-plugin.git#df9902a173031e5272466adfb129bbdb0acf8e84", @@ -4638,20 +4382,6 @@ "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" - }, - "dependencies": { - "form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - } - } } }, "buffer-equal-constant-time": { @@ -4729,9 +4459,21 @@ } }, "follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==" + }, + "form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + } }, "function-bind": { "version": "1.1.2", @@ -4770,9 +4512,9 @@ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" }, "govuk-frontend": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.2.0.tgz", - "integrity": "sha512-beD3wztHpkKz6JUpPwnwop1ejb4rTFMPLCutKLCIDmUS4BPpW59ggVUfctsRqHd2Zjw9wxljdRdeIJ8AZFyyTw==" + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.13.0.tgz", + "integrity": "sha512-6N3pHelWN7wftdM6e4YEzZAfattapa1gnd+Al6d5PUbfTr9D+T2dnphpNpjX75CTEhihlQqlL0RDQ3WIfZ3PSg==" }, "govuk-markdown": { "version": "0.4.0", @@ -4791,10 +4533,11 @@ } }, "govuk-prototype-kit": { - "version": "13.18.0", - "resolved": "https://registry.npmjs.org/govuk-prototype-kit/-/govuk-prototype-kit-13.18.0.tgz", - "integrity": "sha512-zBGDoR/4rajVPtdRQf8L/6RuLSKWDp3rJxaXRZ2RYV3t9GYM1RMKXG0KEm0BY0Hv1GhcIGHjjWBolhXMzA1RdA==", + "version": "13.18.1", + "resolved": "https://registry.npmjs.org/govuk-prototype-kit/-/govuk-prototype-kit-13.18.1.tgz", + "integrity": "sha512-RvuJZs+S1J/JbtGQgqyyo9xd9hDJFJAZ6tieDHrXehadRgbgmZXJytlOlV1zcz5F92L3kJdNva09rTvh51On4g==", "requires": { + "@inquirer/confirm": "^5.1.15", "ansi-colors": "^4.1.3", "body-parser": "^1.20.2", "browser-sync": "^3.0.2", @@ -4808,7 +4551,6 @@ "express-session": "^1.18.0", "fs-extra": "^11.2.0", "govuk-frontend": "5.11.0", - "inquirer": "^8.2.6", "lodash": "^4.17.21", "marked": "^4.3.0", "nodemon": "^3.0.3", @@ -4823,6 +4565,58 @@ "uuid": "^9.0.1" }, "dependencies": { + "@inquirer/confirm": { + "version": "5.1.15", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.15.tgz", + "integrity": "sha512-SwHMGa8Z47LawQN0rog0sT+6JpiL0B7eW9p1Bb7iCeKDGTI5Ez25TSc2l8kw52VV7hA4sX/C78CGkMrKXfuspA==", + "requires": { + "@inquirer/core": "^10.1.15", + "@inquirer/type": "^3.0.8" + } + }, + "@inquirer/core": { + "version": "10.1.15", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.15.tgz", + "integrity": "sha512-8xrp836RZvKkpNbVvgWUlxjT4CraKk2q+I3Ksy+seI2zkcE+y6wNs1BVhgcv8VyImFecUhdQrYLdW32pAjwBdA==", + "requires": { + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^2.0.0", + "signal-exit": "^4.1.0", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==" + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "@inquirer/figures": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", + "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==" + }, + "@inquirer/type": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", + "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", + "requires": {} + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -4979,11 +4773,11 @@ } }, "@types/node": { - "version": "18.18.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.7.tgz", - "integrity": "sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ==", + "version": "22.17.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.17.2.tgz", + "integrity": "sha512-gL6z5N9Jm9mhY+U2KXZpteb+09zyffliRkZyZOHODGATyC5B1Jt/7TzuuiLkFsSUMLbS1OLmlj/E+/3KF4Q/4w==", "requires": { - "undici-types": "~5.26.4" + "undici-types": "~6.21.0" } }, "@types/qs": { @@ -5096,11 +4890,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, "base64id": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", @@ -5116,33 +4905,6 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", @@ -5278,15 +5040,6 @@ "resolved": "https://registry.npmjs.org/bs-recipes/-/bs-recipes-1.3.4.tgz", "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=" }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -5329,11 +5082,6 @@ "supports-color": "^7.1.0" } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" - }, "chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -5354,23 +5102,10 @@ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-spinners": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", - "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==" - }, "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==" }, "cliui": { "version": "7.0.4", @@ -5382,11 +5117,6 @@ "wrap-ansi": "^7.0.0" } }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==" - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -5524,14 +5254,6 @@ "ms": "2.0.0" } }, - "defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "requires": { - "clone": "^1.0.2" - } - }, "del": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", @@ -5729,11 +5451,6 @@ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -5895,16 +5612,6 @@ } } }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, "fast-fifo": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.2.0.tgz", @@ -5930,14 +5637,6 @@ "reusify": "^1.0.4" } }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, "fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -6206,11 +5905,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -6245,40 +5939,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "inquirer": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", - "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^6.0.1" - }, - "dependencies": { - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - } - } - }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -6310,11 +5970,6 @@ "is-extglob": "^2.1.1" } }, - "is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==" - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -6338,11 +5993,6 @@ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" - }, "is-wsl": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", @@ -6389,15 +6039,6 @@ "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=" }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, "marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -6455,11 +6096,6 @@ "mime-db": "1.52.0" } }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -6479,9 +6115,9 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==" }, "negotiator": { "version": "0.6.3", @@ -6595,14 +6231,6 @@ "wrappy": "1" } }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "requires": { - "mimic-fn": "^2.1.0" - } - }, "opn": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", @@ -6611,27 +6239,6 @@ "is-wsl": "^1.1.0" } }, - "ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "requires": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, "p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", @@ -6806,15 +6413,6 @@ "minimatch": "^3.0.2" } }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -6843,11 +6441,6 @@ } } }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -6861,14 +6454,6 @@ "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" }, - "rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "requires": { - "tslib": "^2.1.0" - } - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -7132,11 +6717,6 @@ "side-channel-map": "^1.0.1" } }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, "simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", @@ -7375,19 +6955,6 @@ } } }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7409,11 +6976,6 @@ "nopt": "~1.0.10" } }, - "tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" - }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -7447,9 +7009,9 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" }, "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==" }, "universal-analytics": { "version": "0.5.3", @@ -7510,14 +7072,6 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "requires": { - "defaults": "^1.0.3" - } - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7577,6 +7131,11 @@ "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==" } } + }, + "yoctocolors-cjs": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==" } } }, @@ -7602,9 +7161,9 @@ } }, "highlight.js": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", - "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==" + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", + "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==" }, "jquery": { "version": "3.7.1", @@ -7626,21 +7185,14 @@ "lodash.once": "^4.0.0", "ms": "^2.1.1", "semver": "^7.5.4" - }, - "dependencies": { - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - } } }, "jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", + "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", "requires": { - "buffer-equal-constant-time": "1.0.1", + "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } @@ -7689,14 +7241,6 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, "marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -7720,13 +7264,18 @@ "mime-db": "1.52.0" } }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "notifications-node-client": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/notifications-node-client/-/notifications-node-client-8.0.0.tgz", - "integrity": "sha512-65BxorFYVFOpJ9c2lud/4Ju+Bfn3L/vkih+FuzMhBw1wcOPjwgu4doVH6xO91fHYiAi/0uIx0Mc+NorXeANMHw==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/notifications-node-client/-/notifications-node-client-8.2.1.tgz", + "integrity": "sha512-wyZh/NbjN8S2uQX18utYtCyC726BBaGeTc4HeUpdhZv5sYKuaQY94N31v9syh8SzVgehyMzW37y08EePmi+k3Q==", "requires": { - "axios": "^1.6.1", - "jsonwebtoken": "^9.0.0" + "axios": "^1.7.2", + "jsonwebtoken": "^9.0.2" } }, "proxy-from-env": { @@ -7740,17 +7289,9 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==" } } } From a207742c670e1c32307ffdaa40dba8298807f5d9 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:50:40 +0100 Subject: [PATCH 04/37] Changed header to use new service navigation --- app/views/layout-govuk-form-preview.html | 8 ++++--- app/views/layout-govuk-forms.html | 30 ++++++++++++++++-------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/app/views/layout-govuk-form-preview.html b/app/views/layout-govuk-form-preview.html index 0baf93ba..da4e4b65 100644 --- a/app/views/layout-govuk-form-preview.html +++ b/app/views/layout-govuk-form-preview.html @@ -3,10 +3,12 @@ {% block header %} {{ govukHeader({ homepageUrl: "/", + containerClasses: "govuk-width-container" + }) }} + {{ govukServiceNavigation({ serviceName: data['formTitle'], - serviceUrl: "../your-questions", - containerClasses: "govuk-width-container", - navigationClasses: "govuk-header__navigation--end govuk-!-display-block", + serviceUrl: "0", + navigationClasses: "app-service-navigation", navigation: [ { href: "../your-questions", diff --git a/app/views/layout-govuk-forms.html b/app/views/layout-govuk-forms.html index f32d9fd6..2399d2b2 100644 --- a/app/views/layout-govuk-forms.html +++ b/app/views/layout-govuk-forms.html @@ -5,17 +5,27 @@ homepageUrl: "/", productName: "Forms", serviceUrl: "/", - containerClasses: "govuk-width-container", - navigationClasses: "govuk-header__navigation--end", + containerClasses: "govuk-width-container" + }) }} + {{ govukServiceNavigation({ + navigationClasses: "app-service-navigation", navigation: [ - { - text: "Firstname Lastname" - }, - { - href: "/form-designer/signon/sign-in", - text: "Sign out" - } - ] + { + href: "#", + text: "Your groups" + }, + { + href: "#", + text: "Support" + }, + { + text: "Firstname Lastname" + }, + { + href: "/form-designer/signon/sign-in", + text: "Sign out" + } + ] }) }} {% endblock %} From 2a54361e904b13d1e5590254f42fff39ec509f35 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:51:52 +0100 Subject: [PATCH 05/37] Fixed back link content --- .../completed-forms-email/completed-forms-email.html | 2 +- .../completed-forms-email/enter-email-confirmation-code.html | 2 +- .../completed-forms-email/set-completed-forms-email.html | 2 +- app/views/form-designer/delete-draft-form.html | 2 +- app/views/form-designer/make-your-form-live.html | 2 +- .../form-designer/provide-link-to-privacy-information.html | 2 +- app/views/form-designer/your-questions.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/form-designer/completed-forms-email/completed-forms-email.html b/app/views/form-designer/completed-forms-email/completed-forms-email.html index a599ce1b..fa07c8d9 100644 --- a/app/views/form-designer/completed-forms-email/completed-forms-email.html +++ b/app/views/form-designer/completed-forms-email/completed-forms-email.html @@ -8,7 +8,7 @@ {% block beforeContent %} - Back to create a form + Back to create your form {% endblock %} diff --git a/app/views/form-designer/completed-forms-email/enter-email-confirmation-code.html b/app/views/form-designer/completed-forms-email/enter-email-confirmation-code.html index da88446d..35feff59 100644 --- a/app/views/form-designer/completed-forms-email/enter-email-confirmation-code.html +++ b/app/views/form-designer/completed-forms-email/enter-email-confirmation-code.html @@ -8,7 +8,7 @@ {% block beforeContent %} - Back to create a form + Back to create your form {% endblock %} diff --git a/app/views/form-designer/completed-forms-email/set-completed-forms-email.html b/app/views/form-designer/completed-forms-email/set-completed-forms-email.html index 051a5aad..532605fd 100644 --- a/app/views/form-designer/completed-forms-email/set-completed-forms-email.html +++ b/app/views/form-designer/completed-forms-email/set-completed-forms-email.html @@ -8,7 +8,7 @@ {% block beforeContent %} - Back to create a form + Back to create your form {% endblock %} diff --git a/app/views/form-designer/delete-draft-form.html b/app/views/form-designer/delete-draft-form.html index 01874d72..5848a915 100644 --- a/app/views/form-designer/delete-draft-form.html +++ b/app/views/form-designer/delete-draft-form.html @@ -7,7 +7,7 @@ {% endblock %} {% block beforeContent %} - Back to create a form + Back to create your form {% endblock %} {% block content %} diff --git a/app/views/form-designer/make-your-form-live.html b/app/views/form-designer/make-your-form-live.html index 1f0c3b37..cbae37b5 100644 --- a/app/views/form-designer/make-your-form-live.html +++ b/app/views/form-designer/make-your-form-live.html @@ -8,7 +8,7 @@ {% block beforeContent %} - Back to create a form + Back to create your form {% endblock %} diff --git a/app/views/form-designer/provide-link-to-privacy-information.html b/app/views/form-designer/provide-link-to-privacy-information.html index c4d2366d..8f11505c 100644 --- a/app/views/form-designer/provide-link-to-privacy-information.html +++ b/app/views/form-designer/provide-link-to-privacy-information.html @@ -8,7 +8,7 @@ {% block beforeContent %} - Back to create a form + Back to create your form {% endblock %} diff --git a/app/views/form-designer/your-questions.html b/app/views/form-designer/your-questions.html index 4792bfe4..96307fed 100644 --- a/app/views/form-designer/your-questions.html +++ b/app/views/form-designer/your-questions.html @@ -8,7 +8,7 @@ {% block beforeContent %} - Back to {{ "your form" if data['status'] === 'Live' else "create a form" }} + Back to {{ "your form" if data['status'] === 'Live' else "create your form" }} {% endblock %} From c6bafc305dcbb0881b62aea2ea364cf8a12d9aae Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:52:25 +0100 Subject: [PATCH 06/37] Fixed back link content and spacing --- app/views/form-designer/provide-support-details.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/form-designer/provide-support-details.html b/app/views/form-designer/provide-support-details.html index 2aa31ef4..69d4fc6b 100644 --- a/app/views/form-designer/provide-support-details.html +++ b/app/views/form-designer/provide-support-details.html @@ -9,7 +9,7 @@ {% block beforeContent %} - Back to create a form + Back to create your form {% endblock %} @@ -44,8 +44,8 @@

{{ pageTitle }}

-

- The optional email confirmation will also include the 'what happens next' information you provide. It will not contain a copy of their answers. +

+ The optional email confirmation will also include the ‘what happens next’ information you provide. It will not contain a copy of their answers.

{% set emailHtml %} From 7af6d9b56fb19b91728ac8771cfaa957b40a8c52 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:52:53 +0100 Subject: [PATCH 07/37] Created new receive CSV file task page --- app/views/form-designer/receive-csv.html | 100 +++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 app/views/form-designer/receive-csv.html diff --git a/app/views/form-designer/receive-csv.html b/app/views/form-designer/receive-csv.html new file mode 100644 index 00000000..53433b78 --- /dev/null +++ b/app/views/form-designer/receive-csv.html @@ -0,0 +1,100 @@ +{% extends "layout-govuk-forms.html" %} + +{% set pageTitle = 'Get completed forms as CSV files' %} + +{% block pageTitle %} + {{ "Error: " if containsErrors }}{{ pageTitle }}: {{ data.formTitle or '[formTitle]' }} - GOV.UK Forms +{% endblock %} + +{% block beforeContent %} + + Back to create your form + +{% endblock %} + +{% block content %} +
+
+
+ + {% if containsErrors %} + {{ govukErrorSummary({ + titleText: "There is a problem", + errorList: errorList + }) }} + {% endif %} + + {{ data.formTitle or '[formTitle]' }} +

{{ pageTitle }}

+ +

+ When a form is completed, the answers provided will be sent in the body of an email to the email address you set up. +

+

+ If you wish, you can also get the answers in a comma-separated values (CSV) file. A CSV lists all the answers in plain text, separated by commas. It can be easier to copy and paste, or import into spreadsheets or other applications. +

+

+ If you select this option, a CSV file will be attached to each completed form email. +

+ + + + {{ govukCheckboxes({ + name: "receiveCSV", + fieldset: { + legend: { + text: "Do you want to get completed forms as CSV files?", + isPageHeading: false, + classes: "govuk-fieldset__legend--m" + } + }, + items: [ + { + value: "true", + text: "Get CSV files" + } + ], + errorMessage: { text: errors['receiveCSV'].text } if errors['receiveCSV'].text + }) }} + + {{ govukButton({ + text: "Save and continue" + }) }} + +
+
+
+{% endblock %} + +{% block footer %} + {{ govukFooter({ + meta: { + items: [ + { + href: "/prototype-admin/show-data", + text: "Show data" + }, + { + href: "/manage-prototype/clear-data", + text: "Clear data" + } + ] + } + }) }} +{% endblock %} + +{% block pageScripts %} + +{% endblock %} \ No newline at end of file From 4778f63bb3c80d21e58a48998a931f69b0acfe3b Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:53:09 +0100 Subject: [PATCH 08/37] Created new share preview task page --- app/views/form-designer/share-preview.html | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 app/views/form-designer/share-preview.html diff --git a/app/views/form-designer/share-preview.html b/app/views/form-designer/share-preview.html new file mode 100644 index 00000000..d474617d --- /dev/null +++ b/app/views/form-designer/share-preview.html @@ -0,0 +1,121 @@ +{% extends "layout-govuk-forms.html" %} + +{% set pageTitle = 'Share a preview of your draft form' %} + +{% block pageTitle %} + {{ "Error: " if containsErrors }}{{ pageTitle }}: {{ data.formTitle or '[formTitle]' }} - GOV.UK Forms +{% endblock %} + +{% block beforeContent %} + + Back to create your form + +{% endblock %} + +{% set titleURL = (data.formTitle or '[formTitle]') | lower | replace(':', '') | replace('-', '') | replace(',', '') | replace(' ', '-') %} + +{% block content %} +
+
+
+ + {% if containsErrors %} + {{ govukErrorSummary({ + titleText: "There is a problem", + errorList: errorList + }) }} + {% endif %} + + {{ data.formTitle or '[formTitle]' }} +

{{ pageTitle }}

+ +

+ You can share a link to a preview of your draft form so people can try it out and review the content. +

+

+ You may need to share it with your organisation’s GOV.UK publishing team so they can: +

+
    +
  • review the content
  • +
  • make any necessary changes to related content on GOV.UK
  • +
+

+ Anyone with the preview link can view the form - no password is needed. +

+ +

Preview link for this draft form

+

+ https://submit.dev.forms.service.gov.uk/preview-draft/{{titleURL}} +

+ + + + + {{ govukRadios({ + name: "sharePreview", + fieldset: { + legend: { + text: "Do you want to mark this task ‘completed’?", + isPageHeading: false, + classes: "govuk-fieldset__legend--m" + } + }, + hint: { + text: "You’ll still be able to come back to get the preview link again if you need to." + }, + items: [ + { + value: "yes", + text: "Yes" + }, + { + value: "no", + text: "No, I’ll come back later" + } + ], + errorMessage: { text: errors['sharePreview'].text } if errors['sharePreview'].text + }) }} + + {{ govukButton({ + text: "Save and continue" + }) }} + +
+
+
+{% endblock %} + +{% block footer %} + {{ govukFooter({ + meta: { + items: [ + { + href: "/prototype-admin/show-data", + text: "Show data" + }, + { + href: "/manage-prototype/clear-data", + text: "Clear data" + } + ] + } + }) }} +{% endblock %} + +{% block pageScripts %} + +{% endblock %} \ No newline at end of file From 5bb962af79fff2a2f258af31e7856ad13adc9b35 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:53:47 +0100 Subject: [PATCH 09/37] Updated screen to match a group landing page --- app/views/form-designer/your-forms.html | 39 +++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/app/views/form-designer/your-forms.html b/app/views/form-designer/your-forms.html index 29521289..69208403 100644 --- a/app/views/form-designer/your-forms.html +++ b/app/views/form-designer/your-forms.html @@ -6,10 +6,29 @@ {{pageTitle}} - {{serviceName}} {% endblock %} +{% block beforeContent %} + Back to your groups +{% endblock %} + {% block content %}
-

{{serviceName}}

+ + Trial group +

{{ data['groupName'] or 'Your test forms' }}

+ + {{ govukButton({ text: "Create a form", @@ -19,18 +38,27 @@

{{serviceName}}

{% if data['formTitle'] %} - + + + + +
[departmentName] forms + Forms in ‘{{ data['groupName'] or 'Your test forms' }}’ +
Form nameCreated by StatusActions
- {{data['formTitle']}} + + {{ data['formTitle'] }} + + {{ data['formCreator'] or 'Firstname Lastname' }} + {% if data['status'] %} {{govukTag({ @@ -39,6 +67,11 @@

{{serviceName}}

})}} {% endif %}
+ + Change group {{ data['formTitle'] }} + +
From 87f7b2626bfeccd3cbf0bd3ed668e1ebbf90eca9 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:54:20 +0100 Subject: [PATCH 10/37] Back link and page content alignment with prod --- .../pages/check-answers/edit.html | 4 +- .../pages/confirmation/edit.html | 87 ++++++++++++++++--- 2 files changed, 77 insertions(+), 14 deletions(-) diff --git a/app/views/form-designer/pages/check-answers/edit.html b/app/views/form-designer/pages/check-answers/edit.html index c1b5f21a..b729a837 100644 --- a/app/views/form-designer/pages/check-answers/edit.html +++ b/app/views/form-designer/pages/check-answers/edit.html @@ -11,7 +11,7 @@ {% if prevPageId > 0 %} Back {% else %} - Back to create a form + Back to create your form {% endif %} {% endblock %} @@ -46,7 +46,7 @@

{{ pageTitle }}

{% set pagePrefix = "p" + pageId + "-" %}

- 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.

diff --git a/app/views/form-designer/pages/confirmation/edit.html b/app/views/form-designer/pages/confirmation/edit.html index fe4c81b9..9ba546cb 100644 --- a/app/views/form-designer/pages/confirmation/edit.html +++ b/app/views/form-designer/pages/confirmation/edit.html @@ -3,7 +3,9 @@ {% set pageTitle = 'Add information about what happens next' %} {% block pageTitle %} - {{ "Error: " if containsErrors }}{{ pageTitle }}: {{ data.formTitle or '[formTitle]' }} - GOV.UK Forms + {{ "Error: " if containsErrors }}{{ pageTitle }}: + {{ data.formTitle or '[formTitle]' }} + - GOV.UK Forms {% endblock %} {% block beforeContent %} @@ -11,7 +13,7 @@ {% if prevPageId > 0 %} Back {% else %} - Back to create a form + Back to create your form {% endif %} {% endblock %} @@ -20,13 +22,13 @@

{% if successMessage %} - {{ govukNotificationBanner({ + {{ govukNotificationBanner({ type: 'success', text: successMessage }) }} {% endif %} -
+ {% if containsErrors %} {{ govukErrorSummary({ @@ -45,7 +47,7 @@

{{ pageTitle }}

{% set pagePrefix = "p" + pageId + "-" %}

- Add some information to tell people what will happen after they've submitted their form, and when - so they know what to expect. + Add some information to tell people what will happen after they’ve submitted their form, and when - so they know what to expect.

Example

@@ -58,7 +60,7 @@

Example

  • - shown to people when they've completed and submitted a form + shown to people when they’ve completed and submitted a form
  • included in an email confirmation, if they choose to receive this @@ -69,6 +71,10 @@

    Example

    The optional email confirmation will also include the contact details you provide for the form, and the date and time of submission. It will not include a copy of their answers.

    + {{ govukInsetText({ + text: "GOV.UK Forms adds a unique reference number to the confirmation page and optional email confirmation. This will also be included in submission emails sent to your processing email address." + }) }} + {{ govukCharacterCount({ name: "confirmationNext", id: "confirmationNext", @@ -81,6 +87,63 @@

    Example

    errorMessage: { text: errors['confirmationNext'].text } if errors['confirmationNext'].text }) }} +
    + + +

    + Formatting help +

    +
    +
    +
    +

    Links and URLs

    + +

    + To add a link, use square brackets [ ] around the link text, and round brackets ( ) around the full URL. Make sure there are no spaces between the two sets of brackets. For example: +

    + +
    +
    [link text](https://www.gov.uk/link-text-url)
    +
    + +

    Bulleted lists

    + +

    + To add bullet points, start each item with * (asterisk) or - (dash). Make sure there is one space after the asterisk or dash. +

    + +

    + Leave one empty line before adding the first bullet point and another after the last bullet point. For example: +

    + +
    +
    
    +              * first bullet point
    +              * second bullet point
    +              * third bullet point
    +              
    +
    + +

    Numbered lists

    + +

    + Use numbers for each list item, followed by a full stop. Make sure there is one space after the full stop. +

    + +

    + Leave one empty line before adding the first list item and another after the last list item. For example: +

    + +
    +
    
    +                1. first item
    +                2. second item
    +                3. third item
    +              
    +
    +
    +
    + {{ govukButton({ @@ -88,15 +151,15 @@

    Example

    name: "action", value: "continue" }) }} - +
{% endblock %} {% block pageScripts %} - -{% endblock %} + +{% endblock %} \ No newline at end of file From 4335486dec55e2f4816ce21c7b0734039a2b356d Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:54:48 +0100 Subject: [PATCH 11/37] Updated task list page with missing tasks and other content fixes --- .../partials/status-draft-form.html | 77 ++++++++++++++----- 1 file changed, 57 insertions(+), 20 deletions(-) diff --git a/app/views/form-designer/partials/status-draft-form.html b/app/views/form-designer/partials/status-draft-form.html index 55ebafa0..be65320e 100644 --- a/app/views/form-designer/partials/status-draft-form.html +++ b/app/views/form-designer/partials/status-draft-form.html @@ -1,5 +1,5 @@ {{ data.formTitle or '[formTitle]' }} -

{{pageTitle}}

+

{{ pageTitle }}

Status
@@ -20,11 +20,11 @@

{{pageTitle}}

{% endif %}

- You have completed {{sections}} of 9 tasks. + You have completed {{ sections }} of 10 tasks.

- Create your form + 1. Create your form

{# SET STATUS OF THE FORM TITLE #} @@ -32,7 +32,7 @@

{% set formNameStatusText = 'Completed' %} {% else %} {% set formNameStatusTag = 'govuk-tag--blue' %} - {% set formNameStatusText = 'Not yet started' %} + {% set formNameStatusText = 'Not started' %} {% endif %} {% set htmlFormTitle %} {% if data['formTitle'] %} @@ -52,7 +52,7 @@

{% set questionStatusText = 'In progress' %} {% else %} {% set questionStatusTag = 'govuk-tag--blue' %} - {% set questionStatusText = 'Not yet started' %} + {% set questionStatusText = 'Not started' %} {% endif %} {% set htmlAddedQuestions %} {% if data.isQuestionsComplete === 'yes' %} @@ -72,7 +72,7 @@

{% set declarationStatusText = 'In progress' %} {% else %} {% set declarationStatusTag = 'govuk-tag--blue' %} - {% set declarationStatusText = 'Not yet started' %} + {% set declarationStatusText = 'Not started' %} {% endif%} {% set htmlDeclaration %} {% if data.isDeclarationComplete === 'yes' %} @@ -89,7 +89,7 @@

{% set whatHappensNextStatusText = 'Completed' %} {% else %} {% set whatHappensNextStatusTag = 'govuk-tag--blue' %} - {% set whatHappensNextStatusText = 'Not yet started' %} + {% set whatHappensNextStatusText = 'Not started' %} {% endif%} {% set htmlWhatHappensNext %} {% if data.confirmationNext %} @@ -180,7 +180,7 @@

Optional tasks

{% endif %} {% if not (data.formsEmail) %} {% set submissionEmailStatusTag = 'govuk-tag--blue' %} - {% set submissionEmailStatusText = 'Not yet started' %} + {% set submissionEmailStatusText = 'Not started' %} {% elif (data.formsEmail and (not data.confirmationCode)) or data.currentFormsEmail %} {% set submissionEmailStatusTag = 'govuk-tag--light-blue' %} {% set submissionEmailStatusText = 'In progress' %} @@ -213,7 +213,7 @@

Optional tasks

{% set confirmationCodeStatusHint = '' %} {% elif data.formsEmail and not data.confirmationCode %} {% set confirmationCodeStatusTag = 'govuk-tag--blue' %} - {% set confirmationCodeStatusText = 'Not yet started' %} + {% set confirmationCodeStatusText = 'Not started' %} {% else %} {% set confirmationCodeStatusText = 'Completed' %} {% endif%} @@ -228,7 +228,7 @@

Optional tasks

{% endset %}

- Set email address for completed forms + 2. Set up how you get completed forms

{{ govukTaskList({ idPrefix: "processing-email", @@ -261,6 +261,31 @@

] }) }} +{# SET STATUS OF SUBMISSION FILE #} +{% if data.csvFiles %} + {% set csvFilesStatusText = 'Completed' %} +{% else %} + {% set csvFilesStatusTag = 'govuk-task-list__status--cannot-start-yet' %} + {% set csvFilesStatusText = 'Optional' %} +{% endif%} + +

Optional tasks

+{{ govukTaskList({ + idPrefix: "csv-files", + items: [ + { + title: { + text: "Get completed forms as CSV files" + }, + href: "receive-csv", + status: { + text: csvFilesStatusText, + classes: csvFilesStatusTag if not data.csvFiles + } + } + ] +}) }} + {# SET STATUS OF PRIVACY INFORMATION #} {# Refactor this logic outside of class attribute #} @@ -268,7 +293,7 @@

{% set privacyInformationStatusText = 'Completed' %} {% else %} {% set privacyInformationStatusTag = 'govuk-tag--blue' %} - {% set privacyInformationStatusText = 'Not yet started' %} + {% set privacyInformationStatusText = 'Not started' %} {% endif%} {% set htmlPrivacyInformation %} {% if data.privacyInformation %} @@ -286,7 +311,7 @@

{% set supportDetailsStatusText = 'Completed' %} {% else %} {% set supportDetailsStatusTag = 'govuk-tag--blue' %} - {% set supportDetailsStatusText = 'Not yet started' %} + {% set supportDetailsStatusText = 'Not started' %} {% endif%} {% set htmlSupportDetails %} {% if data.supportDetails %} @@ -299,10 +324,10 @@

{% endset %}

- Provide privacy and contact details + 3. Provide privacy and contact details

{{ govukTaskList({ - idPrefix: "processing-email", + idPrefix: "privacy-and-support", items: [ { title: { @@ -331,7 +356,7 @@

{% set formVersionStatusText = 'Completed' %} {% elif sections >= 6 %} {% set formVersionStatusTag = 'govuk-tag--blue' %} - {% set formVersionStatusText = 'Not yet started' %} + {% set formVersionStatusText = 'Not started' %} {% else %} {% set formVersionStatusTag = 'govuk-task-list__status--cannot-start-yet' %} {% set formVersionStatusText = 'Cannot start yet' %} @@ -348,7 +373,7 @@

{% endset %}

- Make your form live + 4. Make your form live

{% if data['journey'] and data['journey'] == 'groupAdminTasks' %} @@ -370,19 +395,31 @@

{% else %} {{ govukTaskList({ - idPrefix: "processing-email", + idPrefix: "make-live", items: [ + { + title: { + text: "Share a preview of your draft form" + }, + href: "share-preview", + status: { + tag: { + text: "Not started", + classes: "govuk-tag--blue" + } + } + }, { title: { text: "Make your form live" }, hint: { text: formVersionStatusHint - } if sections < 6, - href: "make-your-form-live" if sections >= 6, + } if sections < 7, + href: "make-your-form-live" if sections >= 7, status: { html: htmlFormVersion, - classes: formVersionStatusTag if (data.status == 'Live') or (sections < 6) + classes: formVersionStatusTag if (data.status == 'Live') or (sections < 7) } } ] From 48f12b7324d28a9bbc86235ae888a7fdfc592e88 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 10:55:02 +0100 Subject: [PATCH 12/37] Content alignment with prod --- .../payment/add-payment-link.html | 113 ++++++++++-------- 1 file changed, 63 insertions(+), 50 deletions(-) diff --git a/app/views/form-designer/payment/add-payment-link.html b/app/views/form-designer/payment/add-payment-link.html index 77aeb7f3..e4366c55 100644 --- a/app/views/form-designer/payment/add-payment-link.html +++ b/app/views/form-designer/payment/add-payment-link.html @@ -8,7 +8,7 @@ {% block beforeContent %} - Back to create a form + Back to create your form {% endblock %} @@ -28,75 +28,88 @@

{{ pageTitle }}

- You can set up a payment page (called a ‘payment link’) on GOV.UK Pay - this lets someone make a payment after submitting their form. + You can use GOV.UK Pay (opens in a new tab) to set up a payment page (called a ‘payment link’).

-

+ Once it’s set up, you can copy and paste the payment link URL into the box below. This will add a payment page to the end of your form.

- {% if data['payment-link-content'] !== 'long-content' %} -

- - Find out how to create a GOV.UK Pay payment link (opens in a new tab) - +

Setting up GOV.UK Pay

+

+ You’ll need to set up a GOV.UK Pay account if you do not already have one.

- {% endif %} - - {% if (data['payment-link-content'] === 'medium-content') or (data['payment-link-content'] === 'long-content') %} -

How this will work for people filling in your form

+

+ You’ll also need to talk to your organisation’s finance team to: +

+
    +
  • make sure you’re allowed to take payments in this way
  • +
  • set up a payment service provider (PSP)
  • +
-

- Once someone's submitted their form they'll see a confirmation page showing: -

-
    -
  • a blue banner saying “You still need to pay”
  • -
  • their GOV.UK Forms reference number
  • -
  • a green ‘Continue to pay’ button - this will take them to GOV.UK Pay to make their payment
  • -
+ {{ govukInsetText({ + text: "It could be up to several months before you’re ready to take payments. This depends on the PSP arrangements for your organisation." + }) }} -

- These details will also be included in a confirmation email if someone chooses to receive this. -

+

Creating your payment link in GOV.UK Pay

+

+ Once you have a GOV.UK Pay account you can start creating your payment link by selecting Add a new service. +

+ +

Set up your payment link to use a form’s unique reference number

+

+ GOV.UK Forms adds a unique 8-character reference to each form submission. +

+

+ When creating a payment link in GOV.UK Pay, you’ll be asked ‘Do your users already have a payment reference?’ +

+

+ Select Yes. +

+

+ This means the form reference number will automatically be sent through to GOV.UK Pay when someone makes a payment. +

+

+ When asked to fill in the Name of payment reference field, enter ‘Form reference number’. +

- {% endif %} +

How this will help people processing your forms

+

+ The form reference number will be included in the form submission email sent to your processing email address. +

+

+ This can help match up form submissions with payments in GOV.UK Pay. +

+

+ Find out more about creating a GOV.UK Pay payment link (opens in a new tab) +

- {% if data['payment-link-content'] === 'long-content' %} -

- Setting up a ‘payment link’ on GOV.UK Pay -

- -

- Before you can take payments using a payment link you’ll need to: -

- - - {{ govukInsetText({ - text: "It may be up to several months before you’re ready to take payments. This depends on the PSP arrangements for your department." - }) }} - -

- - Find out how to create a GOV.UK Pay payment link (opens in a new tab) - -

+

How this will work for people filling in your form

+

+ Once someone’s submitted their form they’ll see a confirmation page showing: +

+
    +
  • a blue banner saying ‘You still need to pay’
  • +
  • their form’s unique reference number
  • +
  • the ‘what happens next’ information you’ve added
  • +
  • a green ‘Continue to pay’ button - this will take them to GOV.UK Pay to make their payment
  • +
+

+ The reference number, payment link and ‘what happens next’ information will also be included in a confirmation email for form fillers - if they choose to receive this. +

- {% endif %} {{ govukInput({ label: { - text: "Enter the URL of your GOV.UK Pay payment link ", + text: "Enter the URL of your GOV.UK Pay payment link", classes: "govuk-label--m" }, classes: "govuk-!-width-two-thirds", id: "payment-link", name: "paymentLink", hint: { - text: "For example, https://gov.uk/payments/your-payment-link" + text: "For example, https://www.gov.uk/payments/your-payment-link" }, value: data['paymentLink'], errorMessage: { From 14f6bfee005239be222e737d405214044e21c68f Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 15:19:27 +0100 Subject: [PATCH 13/37] Small change to add for to hidden text --- app/views/form-designer/your-forms.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/form-designer/your-forms.html b/app/views/form-designer/your-forms.html index 69208403..d6fa74b7 100644 --- a/app/views/form-designer/your-forms.html +++ b/app/views/form-designer/your-forms.html @@ -68,8 +68,8 @@

{{ data['groupName'] or 'Your test forms' }}

{% endif %} - - Change group {{ data['formTitle'] }} + + Change group for {{ data['formTitle'] }} From bd2c8e6cd5ee2727e1580e1f098c6d19aeb3de3e Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 16 Oct 2025 15:20:02 +0100 Subject: [PATCH 14/37] Created new change group page --- .../form-designer/groups/move-form-group.html | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 app/views/form-designer/groups/move-form-group.html diff --git a/app/views/form-designer/groups/move-form-group.html b/app/views/form-designer/groups/move-form-group.html new file mode 100644 index 00000000..ee909fbc --- /dev/null +++ b/app/views/form-designer/groups/move-form-group.html @@ -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 %} + Back to your forms +{% endblock %} + +{% block content %} +
+
+
+ + {% if containsErrors %} + {{ govukErrorSummary({ + titleText: "There is a problem", + errorList: errorList + }) }} + {% endif %} + + {{ data['formTitle'] or '[formTitle]' }} +

{{ data['groupName'] or 'Your test forms' }}

+ + {{ 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' + } + } + ] + }) }} + +

+ 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. +

+ + {{ 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" + }) }} + +
+
+
+{% endblock %} From 879e10a246980edb11ebff3fed845d8dfe79a63a Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Mon, 20 Oct 2025 14:07:30 +0100 Subject: [PATCH 15/37] Custom styling for Welsh translation screen --- app/assets/sass/application.scss | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/app/assets/sass/application.scss b/app/assets/sass/application.scss index ffae036e..0cc1ba87 100644 --- a/app/assets/sass/application.scss +++ b/app/assets/sass/application.scss @@ -300,4 +300,44 @@ Summary card flex: 1 0 auto; text-align: right; } +} + +// Welsh version translation screen +.app-translate-table { + border: 2px solid #dee0e2; + + .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; + .govuk-input, + .govuk-textarea { + border: 0; + margin: 0; + } + } } \ No newline at end of file From 7eb93349fb502c73bfe83432bf4fa1292d6b6524 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Mon, 20 Oct 2025 14:07:45 +0100 Subject: [PATCH 16/37] New Welsh translation screen - first version --- .../welsh/add-welsh-version.html | 565 ++++++++++++++++++ 1 file changed, 565 insertions(+) create mode 100644 app/views/form-designer/welsh/add-welsh-version.html diff --git a/app/views/form-designer/welsh/add-welsh-version.html b/app/views/form-designer/welsh/add-welsh-version.html new file mode 100644 index 00000000..ec173ab5 --- /dev/null +++ b/app/views/form-designer/welsh/add-welsh-version.html @@ -0,0 +1,565 @@ +{% extends "layout-govuk-forms.html" %} + +{% set pageTitle = 'Add a Welsh version of your form' %} + +{% block pageTitle %} + {{ pageTitle }}{% if data.status == 'Draft' %}: {{ data.formTitle or '[formTitle]' }}{% endif %} - {{ serviceName }} +{% endblock %} + +{% block beforeContent %} + Back to create your form +{% endblock %} + +{% block content %} +
+
+ + {% if data.successMessage %} + {{ govukNotificationBanner({ + type: 'success', + text: data.successMessage + }) }} + {% endif %} + + {{ data.formTitle or '[formTitle]' }} +

{{ pageTitle }}

+
+
Status
+
+ {{ govukTag({ + text: data['status'], + classes: "govuk-tag--yellow" + }) }} +
+
+ +
+ {{ govukButton({ + text: "Download as a spreadsheet", + classes: "govuk-button--secondary", + name: "action", + value: "download" + }) }} + {% if data.pages.length %} + + Preview this form + + {% endif %} +
+ + {# FORM NAME #} + {% set formNameInput -%} + {{ govukInput({ + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh form name", + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-form-name", + name: "welshFormName", + attributes: 'aria-describedby="englishVersion"' + }) }} + {%- endset %} + + {{ govukTable({ + caption: "Form name", + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + head: [ + { + text: "English content" + }, + { + text: "Welsh content" + } + ], + rows: [ + [ + { + classes: "app-table-half-width", + text: data.formTitle or '[formTitle]', + attributes: 'id="englishVersion"' + }, + { + classes: "app-table__cell-input", + html: formNameInput + } + ] + ] + }) }} + + {# FORM QUESTIONS #} + {% if data.pages > 0 %} + {% for question in data.pages %} + {% set pageHeadingInput -%} + {{ govukInput({ + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh page heading", + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-page-heading" + loop.index0, + name: "welshPageHeading" + loop.index0, + attributes: 'aria-describedby="englishPageHeading' + loop.index0 + '"' + }) }} + {%- endset %} + {% set guidanceTextInput -%} + {{ govukTextarea({ + formGroup: { + classes: "app-welsh-form-group" + }, + rows: "10", + label: { + text: "Enter Welsh guidance text", + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-guidance-text" + loop.index0, + name: "welshGuidanceText" + loop.index0, + attributes: 'aria-describedby="englishGuidanceText' + loop.index0 + '"' + }) }} + {%- endset %} + {% set questionTextInput -%} + {{ govukInput({ + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh question text", + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-question-text" + loop.index0, + name: "welshQuestionText" + loop.index0, + attributes: 'aria-describedby="englishVersion' + loop.index0 + '"' + }) }} + {%- endset %} + {% set hintTextInput -%} + {{ govukInput({ + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh hint text", + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-hint-text" + loop.index0, + name: "welshHintText" + loop.index0, + attributes: 'aria-describedby="englishHintText' + loop.index0 + '"' + }) }} + {%- endset %} + + {{ govukTable({ + caption: "Question " + loop.index, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + firstCellIsHeader: true, + head: [ + {}, + { + text: "English content" + }, + { + text: "Welsh content" + } + ], + rows: [ + [ + { + classes: "app-table-one-quarter-width", + text: 'Page heading' + }, + { + classes: "app-table-one-third-width", + text: question['page-name'], + attributes: 'id="englishPageHeading' + loop.index0 + '"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: pageHeadingInput + } + ] if question['additional-guidance'], + [ + { + classes: "app-table-one-quarter-width", + text: 'Guidance text' + }, + { + classes: "app-table-one-third-width", + text: question['additional-guidance-text'], + attributes: 'id="englishGuidanceText' + loop.index0 + '"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: guidanceTextInput + } + ] if question['additional-guidance'], + [ + { + classes: "app-table-one-quarter-width", + text: 'Question text' + }, + { + classes: "app-table-one-third-width", + text: question['long-title'], + attributes: 'id="englishQuestion' + loop.index0 + '"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: questionTextInput + } + ], + [ + { + classes: "app-table-one-quarter-width", + text: 'Hint text' + }, + { + classes: "app-table-one-third-width", + text: question['hint-text'], + attributes: 'id="englishHintText' + loop.index0 + '"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: hintTextInput + } + ] if question['hint-text'] + ] + }) }} + {% endfor %} + {% else %} +

Form questions

+

No questions have been added to the form.

+ {% endif %} + + {# FORM DECLARATION #} + {% set declarationSubhead = 'Declaration for people to agree to' %} + {% set checkAnswersDeclarationInput -%} + {{ govukTextarea({ + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh " + declarationSubhead, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-check-answers-declaration", + name: "welshCheckAnswersDeclaration", + attributes: 'aria-describedby="englishCheckAnswersDeclaration"' + }) }} + {%- endset %} + {% if data.checkAnswersDeclaration and data.checkAnswersDeclaration !== '' %} + {{ govukTable({ + caption: declarationSubhead, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + head: [ + { + text: "English content" + }, + { + text: "Welsh content" + } + ], + rows: [ + [ + { + classes: "app-table-one-third-width", + text: data.checkAnswersDeclaration, + attributes: 'id="englishCheckAnswersDeclaration"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: checkAnswersDeclarationInput + } + ] + ] + }) }} + {% else %} +

{{ declarationSubhead }}

+

No declaration was added to the form.

+ {% endif %} + + {# FORM INFORMATION ABOUT WHAT HAPPENS NEXT (WHN) #} + {% set whnSubhead = 'Information about what happens next' %} + {% set confirmationNextInput -%} + {{ govukTextarea({ + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh " + whnSubhead, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-confirmation-next", + name: "welshConfirmationNext", + attributes: 'aria-describedby="englishConfirmationNext"' + }) }} + {%- endset %} + {% if data.confirmationNext and data.confirmationNext !== '' %} + {{ govukTable({ + caption: whnSubhead, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + head: [ + { + text: "English content" + }, + { + text: "Welsh content" + } + ], + rows: [ + [ + { + classes: "app-table-one-third-width", + text: data.confirmationNext, + attributes: 'id="englishConfirmationNext"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: confirmationNextInput + } + ] + ] + }) }} + {% else %} +

{{ whnSubhead }}

+

No information about what happens next was added to the form.

+ {% endif %} + + {# FORM PAYMENT LINK #} + {% set paymentLinkSubhead = 'Payment link' %} + {% if data.payments === 'yes' %} +

{{ paymentLinkSubhead }}

+

No payment link has been added to your form.

+ {% endif %} + + {# FORM PRIVACY LINK #} + {% set privacyLinkSubhead = 'Link to privacy information for this form' %} + {% if data.privacyInformation and data.privacyInformation !== '' %} + {% set privacyInformationInput -%} + {{ govukTextarea({ + rows: "2", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh " + privacyLinkSubhead, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-privacy-information", + name: "welshPrivacyInformation", + attributes: 'aria-describedby="englishPrivacyInformation"' + }) }} + {%- endset %} + {{ govukTable({ + caption: privacyLinkSubhead, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + head: [ + { + text: "English content" + }, + { + text: "Welsh content" + } + ], + rows: [ + [ + { + classes: "app-table-one-third-width", + text: data.privacyInformation, + attributes: 'id="englishPrivacyInformation"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: privacyInformationInput + } + ] + ] + }) }} + {% else %} +

{{ privacyLinkSubhead }}

+

No contact details for support have been added to the form.

+ {% endif %} + + {# FORM CONTACT DETAILS FOR SUPPORT #} + {% set supportDetailsSubhead = 'Contact details for support' %} + {% if data.supportDetails %} + {% set emailSupportInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh Email", + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-email-support", + name: "welshEmailSupport", + attributes: 'aria-describedby="englishEmailSupport"' + }) }} + {%- endset %} + {% set phoneSupportInput -%} + {{ govukTextarea({ + rows: "5", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh Telephone", + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-phone-support", + name: "welshPhoneSupport", + attributes: 'aria-describedby="englishPhoneSupport"' + }) }} + {%- endset %} + {% set onlineLinkTextInputInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh Online link text", + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-online-link-text", + name: "welshOnlineLinkText", + attributes: 'aria-describedby="englishOnlineLinkText"' + }) }} + {%- endset %} + {% set onlineLinkURLInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: "Enter Welsh Online link URL", + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-online-link-url", + name: "welshOnlineLinkURL", + attributes: 'aria-describedby="englishOnlineLinkURL"' + }) }} + {%- endset %} + {{ govukTable({ + caption: supportDetailsSubhead, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + firstCellIsHeader: true, + head: [ + {}, + { + text: "English content" + }, + { + text: "Welsh content" + } + ], + rows: [ + [ + { + text: 'Email' + }, + { + classes: "app-table-one-third-width", + text: data.emailSupport, + attributes: 'id="englishEmailSupport"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: emailSupportInput + } + ] if 'email' in data.supportDetails, + [ + { + text: 'Telephone' + }, + { + classes: "app-table-one-third-width", + text: data.phoneSupport, + attributes: 'id="englishPhoneSupport"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: phoneSupportInput + } + ] if 'phone' in data.supportDetails, + [ + { + text: 'Online link text' + }, + { + classes: "app-table-one-third-width", + text: data.onlineSupportText, + attributes: 'id="englishOnlineLinkText"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: onlineLinkTextInput + } + ] if 'online' in data.supportDetails, + [ + { + text: 'Online link URL' + }, + { + classes: "app-table-one-third-width", + text: data.onlineSupportLink, + attributes: 'id="englishOnlineLinkURL"' + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: onlineLinkURLInput + } + ] if 'online' in data.supportDetails + ] + }) }} + {% else %} +

{{ supportDetailsSubhead }}

+

No contact details for support have been added to the form.

+ {% endif %} + +
+
+ +{% endblock %} + +{% block pageScripts %} + +{% endblock %} From 96cdf0e8d2f1936f243387f98969259fa5bc465c Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 21 Oct 2025 10:29:16 +0100 Subject: [PATCH 17/37] Minor changes to add a save button and trying to explore input sizing --- .../welsh/add-welsh-version.html | 48 +++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/app/views/form-designer/welsh/add-welsh-version.html b/app/views/form-designer/welsh/add-welsh-version.html index ec173ab5..cd8345e1 100644 --- a/app/views/form-designer/welsh/add-welsh-version.html +++ b/app/views/form-designer/welsh/add-welsh-version.html @@ -92,7 +92,7 @@

{{ pageTitle }}

}) }} {# FORM QUESTIONS #} - {% if data.pages > 0 %} + {% if data.pages.length > 0 %} {% for question in data.pages %} {% set pageHeadingInput -%} {{ govukInput({ @@ -349,7 +349,7 @@

{{ paymentLinkSubhead }}

{% if data.privacyInformation and data.privacyInformation !== '' %} {% set privacyInformationInput -%} {{ govukTextarea({ - rows: "2", + rows: "1", formGroup: { classes: "app-welsh-form-group" }, @@ -496,7 +496,7 @@

{{ privacyLinkSubhead }}

}, { classes: "app-table-one-third-width", - text: data.phoneSupport, + text: data.phoneSupport | striptags(true) | escape | nl2br, attributes: 'id="englishPhoneSupport"' }, { @@ -538,6 +538,48 @@

{{ privacyLinkSubhead }}

{{ supportDetailsSubhead }}

No contact details for support have been added to the form.

{% endif %} + +
+ {# + {% if (data.isQuestionsComplete == 'yes') and + (data.isDeclarationComplete == 'yes') and + (data.confirmationNext and data.confirmationNext !== '') and + (data.privacyInformation and data.privacyInformation !== '') and + (data.supportDetails and data.supportDetails.length > 0) -%} + {{ govukRadios({ + classes: "govuk-radios", + name: "markWelshComplete", + fieldset: { + legend: { + text: "Have you finished adding your Welsh version?", + isPageHeading: false, + classes: "govuk-fieldset__legend--m" + } + }, + hint: { + text: "Selecting ‘Yes’ will mark this task as complete. You’ll still be able to make more changes if you need to." + }, + items: [ + { + value: "yes", + text: "Yes" + }, + { + value: "no", + text: "No, I’ll come back later" + } + ], + errorMessage: { text: errors['markWelshComplete'].text } if errors['markWelshComplete'].text + }) }} + {%- endif %} + #} + {{ govukButton({ + text: "Save and continue", + name: "action", + value: "continue" + }) }} +
+

From d3262edcf2632a78742ed1f7207038dac0dd7f9f Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 21 Oct 2025 10:39:26 +0100 Subject: [PATCH 18/37] Fix content width --- app/views/form-designer/welsh/add-welsh-version.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/form-designer/welsh/add-welsh-version.html b/app/views/form-designer/welsh/add-welsh-version.html index cd8345e1..e8cc1b09 100644 --- a/app/views/form-designer/welsh/add-welsh-version.html +++ b/app/views/form-designer/welsh/add-welsh-version.html @@ -12,7 +12,7 @@ {% block content %}
-
+
{% if data.successMessage %} {{ govukNotificationBanner({ From 3fd0d259e738918a5e1870c28b753feb1cbeef29 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 21 Oct 2025 10:39:36 +0100 Subject: [PATCH 19/37] Add Welsh optional section and link --- .../partials/status-draft-form.html | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/app/views/form-designer/partials/status-draft-form.html b/app/views/form-designer/partials/status-draft-form.html index be65320e..5749ae9c 100644 --- a/app/views/form-designer/partials/status-draft-form.html +++ b/app/views/form-designer/partials/status-draft-form.html @@ -350,6 +350,30 @@

] }) }} +{# SET STATUS OF WELSH VERSION #} +{% if data.welshVersion %} + {% set welshVersionStatusText = 'Completed' %} +{% else %} + {% set welshVersionStatusTag = 'govuk-task-list__status--cannot-start-yet' %} + {% set welshVersionStatusText = 'Optional' %} +{% endif%} +

4. Add translations to your form (optional)

+{{ govukTaskList({ + idPrefix: "add-welsh-version", + items: [ + { + title: { + text: "Add a link to a payment page on GOV.UK Pay" + }, + href: "welsh/add-welsh-version", + status: { + text: welshVersionStatusText, + classes: welshVersionStatusTag if not data.welshVersion + } + } + ] +}) }} + {# SET STATUS OF LIVE FORM #} {# Refactor this logic outside of class attribute #} {% if data.status == 'Live' %} @@ -373,7 +397,7 @@

{% endset %}

- 4. Make your form live + 5. Make your form live

{% if data['journey'] and data['journey'] == 'groupAdminTasks' %} From 183a63cee479b52756f7e35a515f2de953e84e4b Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 21 Oct 2025 11:09:26 +0100 Subject: [PATCH 20/37] Added more complete data for return form --- .../returning-session-data-defaults-a11y.js | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/app/data/returning-session-data-defaults-a11y.js b/app/data/returning-session-data-defaults-a11y.js index 1928e1a9..a439939c 100644 --- a/app/data/returning-session-data-defaults-a11y.js +++ b/app/data/returning-session-data-defaults-a11y.js @@ -22,7 +22,8 @@ module.exports = { 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?', @@ -65,9 +66,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: [redundancypaymentsonline@insolvency.gov.uk](mailto:redundancypaymentsonline@insolvency.gov.uk)\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' } From 4876294e52136fd05feb538cf7b5102a14192240 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 21 Oct 2025 11:09:37 +0100 Subject: [PATCH 21/37] Updated content to match mural board --- app/views/form-designer/partials/status-draft-form.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/form-designer/partials/status-draft-form.html b/app/views/form-designer/partials/status-draft-form.html index 5749ae9c..5c97bbbf 100644 --- a/app/views/form-designer/partials/status-draft-form.html +++ b/app/views/form-designer/partials/status-draft-form.html @@ -357,13 +357,13 @@

{% set welshVersionStatusTag = 'govuk-task-list__status--cannot-start-yet' %} {% set welshVersionStatusText = 'Optional' %} {% endif%} -

4. Add translations to your form (optional)

+

4. Create a Welsh version of your form (optional)

{{ govukTaskList({ idPrefix: "add-welsh-version", items: [ { title: { - text: "Add a link to a payment page on GOV.UK Pay" + text: "Add a Welsh version of your form" }, href: "welsh/add-welsh-version", status: { From fd84ec27216678d8f53f13e4c2968186615f256b Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 21 Oct 2025 11:10:01 +0100 Subject: [PATCH 22/37] Moved if statements to cover input sets --- app/views/form-designer/welsh/add-welsh-version.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/form-designer/welsh/add-welsh-version.html b/app/views/form-designer/welsh/add-welsh-version.html index e8cc1b09..9140e0c9 100644 --- a/app/views/form-designer/welsh/add-welsh-version.html +++ b/app/views/form-designer/welsh/add-welsh-version.html @@ -241,6 +241,7 @@

Form questions

{# FORM DECLARATION #} {% set declarationSubhead = 'Declaration for people to agree to' %} + {% if data.checkAnswersDeclaration and data.checkAnswersDeclaration !== '' %} {% set checkAnswersDeclarationInput -%} {{ govukTextarea({ formGroup: { @@ -256,7 +257,6 @@

Form questions

attributes: 'aria-describedby="englishCheckAnswersDeclaration"' }) }} {%- endset %} - {% if data.checkAnswersDeclaration and data.checkAnswersDeclaration !== '' %} {{ govukTable({ caption: declarationSubhead, captionClasses: "govuk-table__caption--m", @@ -290,6 +290,7 @@

{{ declarationSubhead }}

{# FORM INFORMATION ABOUT WHAT HAPPENS NEXT (WHN) #} {% set whnSubhead = 'Information about what happens next' %} + {% if data.confirmationNext and data.confirmationNext !== '' %} {% set confirmationNextInput -%} {{ govukTextarea({ formGroup: { @@ -305,7 +306,6 @@

{{ declarationSubhead }}

attributes: 'aria-describedby="englishConfirmationNext"' }) }} {%- endset %} - {% if data.confirmationNext and data.confirmationNext !== '' %} {{ govukTable({ caption: whnSubhead, captionClasses: "govuk-table__caption--m", From f683c83294c6cdbf088fa6e0c38b7436082c9e6e Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 22 Oct 2025 09:14:48 +0100 Subject: [PATCH 23/37] Removed unused default data --- app/data/returning-session-data-defaults-a11y.js | 2 -- app/data/returning-session-data-defaults.js | 2 -- app/data/session-data-defaults.js | 2 -- app/views/working/numbering-questions-list/data.js | 2 -- 4 files changed, 8 deletions(-) diff --git a/app/data/returning-session-data-defaults-a11y.js b/app/data/returning-session-data-defaults-a11y.js index a439939c..c0223847 100644 --- a/app/data/returning-session-data-defaults-a11y.js +++ b/app/data/returning-session-data-defaults-a11y.js @@ -20,8 +20,6 @@ Example usage: module.exports = { highestPageId: 6, action: 'gogogo', - publish: 'GOV.UK', - authentication: 'email', formTitle: 'Take your pet abroad', status: 'Draft', pages: [ diff --git a/app/data/returning-session-data-defaults.js b/app/data/returning-session-data-defaults.js index 7bfc19d3..b6e1dcd8 100644 --- a/app/data/returning-session-data-defaults.js +++ b/app/data/returning-session-data-defaults.js @@ -20,8 +20,6 @@ Example usage: module.exports = { highestPageId: 6, action: 'gogogo', - publish: 'GOV.UK', - authentication: 'email', payments: 'no', pages: [ { diff --git a/app/data/session-data-defaults.js b/app/data/session-data-defaults.js index 95a505bc..d25525e1 100644 --- a/app/data/session-data-defaults.js +++ b/app/data/session-data-defaults.js @@ -23,8 +23,6 @@ module.exports = { highestPageId: 0, action: '', - publish: 'GOV.UK', - authentication: 'email', payments: 'no', pages: [], status: 'Draft', diff --git a/app/views/working/numbering-questions-list/data.js b/app/views/working/numbering-questions-list/data.js index a3105ab2..7e538438 100644 --- a/app/views/working/numbering-questions-list/data.js +++ b/app/views/working/numbering-questions-list/data.js @@ -1,8 +1,6 @@ {% set dummy = { highestPageId: 6, action: 'gogogo', - publish: 'GOV.UK', - authentication: 'email', payments: 'no', pages: [ { From c149c0ea7c8e42689e76fc032bc995ef23a68304 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 22 Oct 2025 09:15:12 +0100 Subject: [PATCH 24/37] Height added so textareas take up full table cell --- app/assets/sass/application.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/sass/application.scss b/app/assets/sass/application.scss index 0cc1ba87..617b8cca 100644 --- a/app/assets/sass/application.scss +++ b/app/assets/sass/application.scss @@ -305,6 +305,7 @@ Summary card // Welsh version translation screen .app-translate-table { border: 2px solid #dee0e2; + height: 100%; .govuk-table__head { background-color: #dee0e2; @@ -334,8 +335,10 @@ Summary card .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; } From 94097b65b7a68045d0bb3756aae0ffade0cb128e Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 22 Oct 2025 09:15:53 +0100 Subject: [PATCH 25/37] Example WHN information from existing form --- app/data/example-form.js | 102 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 app/data/example-form.js diff --git a/app/data/example-form.js b/app/data/example-form.js new file mode 100644 index 00000000..bf010afa --- /dev/null +++ b/app/data/example-form.js @@ -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: [redundancypaymentsonline@insolvency.gov.uk](mailto:redundancypaymentsonline@insolvency.gov.uk)\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 +} From 69084aabe2c152c687b0d31481fd91701efb620a Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 22 Oct 2025 09:16:14 +0100 Subject: [PATCH 26/37] Formatting fix and Welsh link content added --- app/views/form-designer/welsh/add-welsh-version.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/form-designer/welsh/add-welsh-version.html b/app/views/form-designer/welsh/add-welsh-version.html index 9140e0c9..b548c233 100644 --- a/app/views/form-designer/welsh/add-welsh-version.html +++ b/app/views/form-designer/welsh/add-welsh-version.html @@ -42,7 +42,7 @@

{{ pageTitle }}

}) }} {% if data.pages.length %} - Preview this form + Preview this form in Welsh {% endif %}
@@ -322,7 +322,7 @@

{{ declarationSubhead }}

[ { classes: "app-table-one-third-width", - text: data.confirmationNext, + text: data.confirmationNext | striptags(true) | escape | nl2br, attributes: 'id="englishConfirmationNext"' }, { From 33fea0fbc704eab37ee0af71c027d55607e6aef4 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 22 Oct 2025 10:15:38 +0100 Subject: [PATCH 27/37] Simple route for adding Welsh content --- app/routes.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/routes.js b/app/routes.js index 5761a4da..f94cec9b 100644 --- a/app/routes.js +++ b/app/routes.js @@ -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 From 5654689968e6f396ef10d47d9876abf86b165a24 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 22 Oct 2025 10:16:20 +0100 Subject: [PATCH 28/37] Added form element to trigger route and removed unused success banner --- app/views/form-designer/welsh/add-welsh-version.html | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/views/form-designer/welsh/add-welsh-version.html b/app/views/form-designer/welsh/add-welsh-version.html index b548c233..4138f071 100644 --- a/app/views/form-designer/welsh/add-welsh-version.html +++ b/app/views/form-designer/welsh/add-welsh-version.html @@ -13,13 +13,7 @@ {% block content %}
- - {% if data.successMessage %} - {{ govukNotificationBanner({ - type: 'success', - text: data.successMessage - }) }} - {% endif %} +
{{ data.formTitle or '[formTitle]' }}

{{ pageTitle }}

@@ -538,8 +532,7 @@

{{ privacyLinkSubhead }}

{{ supportDetailsSubhead }}

No contact details for support have been added to the form.

{% endif %} - - + {# {% if (data.isQuestionsComplete == 'yes') and (data.isDeclarationComplete == 'yes') and From 37445481a083accf62d54b94cbed18a141206732 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 24 Oct 2025 16:30:55 +0100 Subject: [PATCH 29/37] Linked Welsh preview pages --- app/routes.js | 126 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 112 insertions(+), 14 deletions(-) diff --git a/app/routes.js b/app/routes.js index f94cec9b..20e4529b 100644 --- a/app/routes.js +++ b/app/routes.js @@ -640,40 +640,78 @@ router.get('/form-designer/pages/:pageId/view', function (req, res) { }) // Routing for new-tab page previews, set to a specific page -router.post('/form-designer/preview/:pageId(\\d+)', function (req, res) { +postPreview = function (req, res) { var cya = req.session.data.cya req.session.data.cya = undefined var pageId = req.params.pageId var pageIndex = parseInt(pageId) const isLastQuestionPage = pageIndex === (req.session.data.pages.length - 1) + const url = req.url + // if last question in form OR user clicked on change link from CYA, then go to CYA if(isLastQuestionPage || cya === 'true') { - return res.redirect('check-answers') + if (url.includes(".cy")) { + return res.redirect('check-answers.cy') + } else { + return res.redirect('check-answers') + } } else { - return res.redirect(`${pageIndex + 1}`) + if (url.includes(".cy")) { + return res.redirect(`${pageIndex + 1}.cy`) + } else { + return res.redirect(`${pageIndex + 1}`) + } } -}) +} +router.post('/form-designer/preview/:pageId(\\d+)', postPreview) +router.post('/form-designer/preview/:pageId(\\d+).en', postPreview) +router.post('/form-designer/preview/:pageId(\\d+).cy', postPreview) // Renders the new-tab page preview, set to a specific page -router.get('/form-designer/preview/:pageId(\\d+)', function (req, res) { +getPreview = function (req, res) { var pageId = req.params.pageId var pageIndex = parseInt(pageId) var pageData = req.session.data.pages[pageIndex] const isLastQuestionPage = pageIndex === (req.session.data.pages.length - 1) + const url = req.url + var tempURL = "" + if (url.endsWith(".en")) { + tempURL = url.slice(0, -3) + } else if (url.endsWith(".cy")) { + tempURL = url.slice(0, -3) + } else { + tempURL = url + } + if (pageData) { var markdownContent = pageData['additional-guidance-text'] } - res.render('form-designer/preview/page', { - pageId: pageId, - pageIndex: pageIndex, - pageData: pageData, - isLastQuestionPage, - markdownContent: markdownContent - }) -}) + if (url.endsWith(".cy")) { + res.render('form-designer/preview/cy', { + pageId: pageId, + pageIndex: pageIndex, + pageData: pageData, + isLastQuestionPage, + markdownContent: markdownContent, + tempURL + }) + } else { + res.render('form-designer/preview/page', { + pageId: pageId, + pageIndex: pageIndex, + pageData: pageData, + isLastQuestionPage, + markdownContent: markdownContent, + tempURL + }) + } +} +router.get('/form-designer/preview/:pageId(\\d+)', getPreview) +router.get('/form-designer/preview/:pageId(\\d+).en', getPreview) +router.get('/form-designer/preview/:pageId(\\d+).cy', getPreview) /* ===== @@ -929,7 +967,67 @@ 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 + var { welshFormName, welshPageHeading, welshGuidanceText, welshQuestionText, welshHintText, pages } = req.session.data + + for (let i = 0; i < pages.length; i++) { + // run through all the current pages added to the English form + + // run through the Welsh questions + // add Welsh question to current English page + if (welshQuestionText) { + for (let a = 0; a < welshQuestionText.length; a++) { + let questionKey = Object.keys(welshQuestionText[a]) + let questionNumber = parseInt(questionKey.toString().split("_").pop()) + if (i === questionNumber) { + pages[i]['welsh'] = { + question_text: welshQuestionText[a][questionKey] + } + break; + } + } + } + + // run through the Welsh hint text + // if current hint text key matches current English page + // add Welsh hint text + if (welshHintText) { + for (let b = 0; b < welshHintText.length; b++) { + let hintKey = Object.keys(welshHintText[b]) + let hintNumber = parseInt(hintKey.toString().split("_").pop()) + // does the key match the current question (i) + if (i === hintNumber) { + pages[i]['welsh']['hint_text'] = welshHintText[b][hintKey] + break; + } + } + } + + // run through the Welsh page heading + if (welshPageHeading) { + for (var c = 0; c < welshPageHeading.length; c++) { + var headingKey = Object.keys(welshPageHeading[c]) + var headingNumber = parseInt(headingKey.toString().split("_").pop()) + // does the key match the current question (i) + if (i === headingNumber) { + pages[i]['welsh']['page_heading'] = welshPageHeading[c][headingKey] + break; + } + } + } + + // run through the Welsh guidance text + if (welshGuidanceText) { + for (var d = 0; d < welshGuidanceText.length; d++) { + var guidanceKey = Object.keys(welshGuidanceText[d]) + var guidanceNumber = parseInt(guidanceKey.toString().split("_").pop()) + // does the key match the current question (i) + if (i === guidanceNumber) { + pages[i]['welsh']['guidance_text'] = welshGuidanceText[d][guidanceKey] + break; + } + } + } + } if (welshFormName) { // set a success message for saving From f9ba882feb0775610617fc8b2909bdd98c015d6d Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 24 Oct 2025 16:31:06 +0100 Subject: [PATCH 30/37] Added DWP language toggle CSS --- app/assets/sass/application.scss | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/app/assets/sass/application.scss b/app/assets/sass/application.scss index 617b8cca..bcc34460 100644 --- a/app/assets/sass/application.scss +++ b/app/assets/sass/application.scss @@ -343,4 +343,59 @@ Summary card margin: 0; } } +} + +// DWP Language Toggle +.dwp-language-toggle { + font-family: Helvetica, Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: 400; + font-size: 0.875rem; + line-height: 1.1428571429; +} + +@media print { + .dwp-language-toggle { + font-family: sans-serif; + } +} + +@media (min-width: 40.0625em) { + .dwp-language-toggle { + font-size: 1rem; + line-height: 1.25; + } +} + +@media print { + .dwp-language-toggle { + font-size: 14pt; + line-height: 1.2; + } +} + +.dwp-language-toggle::after { + content: ""; + display: block; + clear: both; +} + +.dwp-language-toggle__list { + margin-top: 1em; + float: right; + text-align: right; +} + +.dwp-language-toggle__list-item { + display: inline-block; +} + +.dwp-language-toggle__list-item:first-child::after { + content: ""; + display: inline-block; + position: relative; + top: 0.1875em; + height: 1em; + border-right: 1px solid #0b0c0c; } \ No newline at end of file From 582f7246fc40ca2039cbc3271d178c2792e4438a Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 24 Oct 2025 16:31:17 +0100 Subject: [PATCH 31/37] Created new Welsh only preview layout --- .../layout-govuk-form-welsh-preview.html | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 app/views/layout-govuk-form-welsh-preview.html diff --git a/app/views/layout-govuk-form-welsh-preview.html b/app/views/layout-govuk-form-welsh-preview.html new file mode 100644 index 00000000..d2c374d4 --- /dev/null +++ b/app/views/layout-govuk-form-welsh-preview.html @@ -0,0 +1,44 @@ +{% extends "govuk-prototype-kit/layouts/govuk-branded.html" %} + +{% block header %} + {{ govukHeader({ + homepageUrl: "/", + containerClasses: "govuk-width-container" + }) }} + {{ govukServiceNavigation({ + serviceName: data.welshFormName, + serviceUrl: "0.cy", + navigationClasses: "app-service-navigation", + navigation: [ + { + href: "../your-questions", + text: "Your questions" + } + ] + }) }} +{% endblock %} + +{% block footer %} + {{ govukFooter({ + meta: { + items: [ + { + href: "#", + text: "Get help with this form" + }, + { + href: "#", + text: "Privacy" + }, + { + href: "https://www.forms.service.gov.uk/accessibility/", + text: "Accessibility" + }, + { + href: "#", + text: "Cookies" + } + ] + } + }) }} +{% endblock %} From 6b8b057da8b8a504a3e308b61f25c53ea5e6728b Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 24 Oct 2025 16:31:38 +0100 Subject: [PATCH 32/37] Created new Welsh page template for preview --- app/views/form-designer/preview/cy.html | 619 ++++++++++++++++++++++++ 1 file changed, 619 insertions(+) create mode 100644 app/views/form-designer/preview/cy.html diff --git a/app/views/form-designer/preview/cy.html b/app/views/form-designer/preview/cy.html new file mode 100644 index 00000000..1e46c153 --- /dev/null +++ b/app/views/form-designer/preview/cy.html @@ -0,0 +1,619 @@ +{% extends "layout-govuk-form-welsh-preview.html" %} +{% set mainClasses = "main--draft govuk-main-wrapper--auto-spacing" %} + +{% if pageData['additional-guidance'] == 'Yes' %} + {% set pageHeading = pageData.welsh.page_heading or 'Welsh guidance text' %} +{% endif %} + +{% set pageTitle = pageData.welsh.question_text or 'Welsh question text' %} + +{% if pageData['questionOptional'] %} + {% set pageTitle = pageTitle + ' (optional)' %} +{% endif %} + +{% set pageHintText = pageData.welsh.hint_text %} + +{% block beforeContent %} + + {% set prevPageId = pageId | int - 1 %} + {% if data.cya %} + Back + {% elif prevPageId >= 0 %} + Back + {% endif %} +{% endblock %} + +{% block pageTitle %} + {% if pageHeading %}{{ pageHeading }}{% else %}{{ pageTitle }}{% endif %} - Welsh Preview - {{ data.welshFormName or '[WelshFormTitle]' }} - GOV.UK +{% endblock %} + +{% block content %} + {% set nextPageId = pageId | int + 1 %} + {% set isLastQuestionPage = pageId == data['highestPageId'] %} + {% set formAction = "../check-answers-page-preview-new-tab" if isLastQuestionPage else nextPageId %} + +
+
+ + + {% if pageData['additional-guidance'] == 'Yes' %} +

{{ pageHeading }}

+ {% markdown %}{{ markdownContent }}{% endmarkdown %} + {% endif %} + + {# + + Every field id is prefixed with a unique page id. + So we can have separate configurations for every page. + + #} + + {# If the page has no intro, set the heading inside of the macros #} + {# The heading doubles up as the label #} + {% set label = { + text: pageTitle, + classes: "govuk-label--l" if pageData['additional-guidance'] != 'Yes' else "govuk-label--m", + isPageHeading: true if pageData['additional-guidance'] != 'Yes' + }%} + + {% set legend = { + text: pageTitle, + classes: "govuk-fieldset__legend--l" if pageData['additional-guidance'] != 'Yes' else "govuk-fieldset__legend--m", + isPageHeading: true if pageData['additional-guidance'] != 'Yes' + }%} + + {# Full name in a single field #} + {% if pageData['type'] === 'personName' %} + {% if (pageData['input'] === 'multi-field') or (pageData['input'] === 'multi-field-plus') %} + + {% call govukFieldset({ + legend: { + text: pageTitle, + classes: "govuk-fieldset__legend--l" if pageData['additional-guidance'] != 'Yes' else "govuk-fieldset__legend--m", + isPageHeading: true if pageData['additional-guidance'] != 'Yes' + } + }) %} + + {% if pageData['hint-text'] %} +

{{ pageHintText }}

+ {% endif %} + + {% if pageData['title'] === 'yes' %} + {{ govukInput({ + label: { + html: 'Title' + }, + classes: "govuk-!-width-one-quarter", + id: pageId + "-name-title", + name: pageId + "-name-title", + autocomplete: "honorific-prefix", + value: data[(pageId | int) + "-name-title"] + }) }} + {% endif %} + + {{ govukInput({ + label: { + html: 'First name' + }, + classes: "govuk-!-width-one-half", + id: pageId + "-first-name", + name: pageId + "-first-name", + autocomplete: "given-name", + value: data[(pageId | int) + "-first-name"] + }) }} + + {% if pageData['input'] === 'multi-field-plus' %} + {{ govukInput({ + label: { + html: 'Middle names' + }, + classes: "govuk-!-width-two-thirds", + id: pageId + "-middle-names", + name: pageId + "-middle-names", + autocomplete: "additional-name", + value: data[(pageId | int) + "-middle-names"] + }) }} + {% endif %} + + {{ govukInput({ + label: { + html: 'Last name' + }, + classes: "govuk-!-width-one-half", + id: pageId + "-last-name", + name: pageId + "-last-name", + autocomplete: "family-name", + value: data[(pageId | int) + "-last-name"] + }) }} + + {% endcall %} + + {% elif (pageData['input'] === 'single-field') and (pageData['title'] === 'yes') %} + + {% call govukFieldset({ + legend: { + text: pageTitle, + classes: "govuk-fieldset__legend--l" if pageData['additional-guidance'] != 'Yes' else "govuk-fieldset__legend--m", + isPageHeading: true if pageData['additional-guidance'] != 'Yes' + } + }) %} + + {% if pageData['hint-text'] %} +

{{ pageHintText }}

+ {% endif %} + + {{ govukInput({ + label: { + html: 'Title' + }, + classes: "govuk-!-width-one-quarter", + id: pageId + "-name-title", + name: pageId + "-name-title", + autocomplete: "honorific-prefix", + value: data[(pageId | int) + "-name-title"] + }) }} + + {{ govukInput({ + label: { + html: 'Full name' + }, + id: pageId + "-full-name", + name: pageId + "-full-name", + autocomplete: "name", + value: data[(pageId | int) + "-full-name"] + }) }} + + {% endcall %} + + {% else %} + + {{ govukInput({ + label: label, + id: pageId + "-full-name", + name: pageId + "-full-name", + hint: { + text: pageHintText + }, + autocomplete: "name", + value: data[(pageId | int) + "-full-name"] + }) }} + + {% endif %} + + {% endif %} + + {# Company or organisation’s name #} + {% if pageData['type'] === 'companyName' %} + {{ govukInput({ + label: label, + hint: { text: pageHintText }, + id: pageId, + name: pageId, + autocomplete: "organization", + value: data[pageId | int] + }) }} + {% endif %} + + {% if pageData['type'] == 'email' %} + {{ govukInput({ + label: label, + hint: { text: pageHintText }, + id: pageId, + name: pageId, + type: "email", + autocomplete: "email", + spellcheck: false, + value: data[pageId | int] + }) }} + {% endif %} + + {% if pageData['type'] == 'phone' %} + {{ govukInput({ + label: label, + hint: { text: pageHintText }, + id: pageId, + name: pageId, + type: "tel", + autocomplete: "tel", + classes: "govuk-input--width-20", + value: data[pageId | int] + }) }} + {% endif %} + + {% if pageData['type'] == 'national-insurance-number' %} + {{ govukInput({ + label: label, + hint: { text: pageHintText }, + classes: "govuk-input--width-10", + id: pageId, + name: pageId, + spellcheck: false, + value: data[pageId | int] + }) }} + {% endif %} + + {% if pageData['type'] == 'address' %} + + {% call govukFieldset({ + legend: { + text: pageTitle, + classes: "govuk-fieldset__legend--l" if pageData['additional-guidance'] != 'Yes' else "govuk-fieldset__legend--m", + isPageHeading: true if pageData['additional-guidance'] != 'Yes' + } + }) %} + + {% if pageData['hint-text'] %} +

{{ pageHintText }}

+ {% endif %} + + {% if ('uk-address' in pageData['input']) and not ('international-address' in pageData['input']) %} + {{ govukInput({ + label: { + html: 'Address line 1' + }, + id: pageId + "-address-line-1", + name: pageId + "-address-line-1", + autocomplete: "address-line1", + value: data[(pageId | int) + '-address-line-1'] + }) }} + + {{ govukInput({ + label: { + html: 'Address line 2 (optional)' + }, + id: pageId + "-address-line-2", + name: pageId + "-address-line-2", + autocomplete: "address-line2", + value: data[(pageId | int) + '-address-line-2'] + }) }} + + {{ govukInput({ + label: { + text: "Town or city" + }, + classes: "govuk-!-width-two-thirds", + id: pageId + "-address-town", + name: pageId + "-address-town", + autocomplete: "address-level2", + value: data[(pageId | int) + '-address-town'] + }) }} + + {{ govukInput({ + label: { + text: "County (optional)" + }, + classes: "govuk-!-width-two-thirds", + id: pageId + "-address-county", + name: pageId + "-address-county", + value: data[(pageId | int) + '-address-county'] + }) }} + + {{ govukInput({ + label: { + text: "Postcode" + }, + classes: "govuk-input--width-10", + id: pageId + "-address-postcode", + name: pageId + "-address-postcode", + autocomplete: "postal-code", + value: data[(pageId | int) + '-address-postcode'] + }) }} + + {#{% elif 'international-address' in pageData['input'] %}#} + {% else %} + + {{ govukTextarea({ + label: { + text: "Street address" + }, + id: pageId + "-address-street-address", + name: pageId + "-address-street-address", + autocomplete: "street-address", + value: data[(pageId | int) + '-address-street-address'] + }) }} + + {{ govukInput({ + label: { + text: "Country" + }, + classes: "govuk-input--width-20", + id: pageId + "-address-country-name", + name: pageId + "-address-country-name", + autocomplete: "country-name", + value: data[(pageId | int) + '-address-country-name'] + }) }} + + {% endif %} + + + {% endcall %} + {% endif %} + + {# Date field #} + {% if pageData['type'] == 'date' %} + + {% set day = pageId + '-day' %} + {% set month = pageId + '-month' %} + {% set year = pageId + '-year' %} + + {% set neValue %}{{data[pageId + '-day'] + '/' + data[pageId + '-month'] + '/' + data[pageId + '-year']}}{% endset %} + + {{ govukDateInput({ + id: pageId, + namePrefix: pageId, + fieldset: { + legend: legend + }, + hint: { + text: pageHintText + }, + items: [ + { + name: "day", + classes: "govuk-input--width-2", + autocomplete: "bday-day" if pageData['input'] === 'yes', + value: data[pageId + '-day'] + }, + { + name: "month", + classes: "govuk-input--width-2", + autocomplete: "bday-month" if pageData['input'] === 'yes', + value: data[pageId + '-month'] + }, + { + name: "year", + classes: "govuk-input--width-4", + autocomplete: "bday-year" if pageData['input'] === 'yes', + value: data[pageId + '-year'] + } + ] + }) }} + + {% endif %} + + {# + For radios and checkboxes I'm using straight HTML, + because I'm not smart enough to loop over the array + and build an object to stick into a macro. + #} + + {# Radios #} + {% if pageData['type'] === 'select' %} + + {% if pageData['type'] === 'yesorno' %} + {% set itemsArray = ['Yes', 'No'] %} + {% else %} + {% set itemsArray = pageData['item-list'] %} + {% endif %} + + {% if pageData['listSettings'] and pageData['listSettings'].includes('oneOption') %} +
+
+ + {% if not pageData['intro-text'] %} + +

+ {{ pageTitle }} preview +

+
+ {% endif %} + +
+ {{ pageHintText }} +
+
+ {% for itemRaw in itemsArray %} + {% set item = itemRaw | trim %} +
+ + +
+ {% endfor %} + {% if pageData['listSettings'].includes('noneOption')%} +
or
+
+ + +
+ {%endif%} +
+
+
+ {% endif %} + + {# Checkboxes #} + {% if not pageData['listSettings'] or (pageData['listSettings'] and not pageData['listSettings'].includes('oneOption')) %} + + {% set itemsArray = pageData['item-list'] %} + +
+
+ + {% if not pageData['intro-text'] %} + +

{{ pageTitle }}

+
+ {% endif %} + +
+ {{ pageHintText }} +
+
+ {% if pageData['item-list'] %} + {% for item in itemsArray %} +
+ + +
+ {% endfor %} + {% if pageData['listSettings'].includes('noneOption')%} +
or
+
+ + +
+ {%endif%} + {% else %} +
+ + +
+
+ + +
+ {% endif %} +
+
+
+ {% endif %} + {% endif %} + + {# Number fields #} + {% if pageData['type'] == 'number' %} + {{ govukInput({ + label: label, + hint: { text: pageHintText }, + id: pageId, + name: pageId, + inputmode: "numeric", + pattern: "[0-9]*", + spellcheck: false, + value: data[pageId | int] + }) }} + {% endif %} + + {# Text information fields #} + {% if pageData['type'] === 'text' %} + {% if pageData['input'] === 'single-line-input' %} + + {# Single line text fields #} + {{ govukInput({ + label: label, + hint: { text: pageHintText }, + id: pageId, + name: pageId, + value: data[pageId | int] + }) }} + + {% else %} + + {# Keeping the character limit options for now in case we want to test it later #} + + {# Textarea with character limit #} + {# {% if pageData['char-limit'] == 'none' %} + {{ govukTextarea({ + label: label, + hint: { text: pageHintText }, + id: pageId, + name: pageId, + value: data[pageId | int] + }) }} + {% endif %} #} + + {# Textarea with no character limit #} + {# {% if not (pageData['char-limit'] == 'none') %} + {{ govukCharacterCount({ + name: pageId, + id: pageId, + maxlength: pageData['char-limit'], + label: label, + hint: { text: pageHintText }, + value: data[pageId | int] + }) }} + {% endif %} #} + + {# Textarea no, no, there's no limits #} + {{ govukTextarea({ + name: pageId, + id: pageId, + label: label, + hint: { text: pageHintText }, + value: data[pageId | int] + }) }} + + {% endif %} + {% endif %} + + {# Help text #} + {% if pageData['help-text'] %} + + {% set helpTextHtml %} +
+ {% markdown %} + {{ pageData['help-text'] }} + {% endmarkdown %} +
+ {% endset -%} + + {{ govukDetails({ + summaryText: "More information about this question", + html: helpTextHtml + }) }} + {% endif %} + + {{ govukButton({ + text: "Continue", + attributes: { + target: "_parent" + } + }) }} + + {% if data['supportDetails'] %} + {% set supportTextHtml %} +
+ {% if 'email' in data['supportDetails'] -%} +

Email

+

+ {{data['emailSupport'] or 'support@department.gov.uk' | safe}} +

+ {%- endif %} + {% if 'phone' in data['supportDetails'] -%} +

Phone

+

{{data['phoneSupport'] | striptags(true) | escape | nl2br }}

+

+ Find out about call charges +

+ {%- endif %} + {% if 'online' in data['supportDetails'] -%} +

Online

+

+ {{data['onlineSupportText'] | safe}} (opens in new tab) +

+ {%- endif %} +
+ {% endset -%} + + {{ govukDetails({ + summaryText: "Get help with this form", + html: supportTextHtml + }) }} + {% endif %} + + +
+
+{% endblock %} From d22c77c85c437fc5ee8b215b4691dbc79e6d9f0c Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 24 Oct 2025 16:32:03 +0100 Subject: [PATCH 33/37] Added DWP Welsh language toggle --- app/views/form-designer/preview/page.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/views/form-designer/preview/page.html b/app/views/form-designer/preview/page.html index f5f32f9d..a72a8081 100644 --- a/app/views/form-designer/preview/page.html +++ b/app/views/form-designer/preview/page.html @@ -12,6 +12,18 @@ {% block beforeContent %} + {% set prevPageId = pageId | int - 1 %} {% if data.cya %} Back From d3ae4974467531e9d599179533c281a3515f7b22 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 24 Oct 2025 16:32:39 +0100 Subject: [PATCH 34/37] Updates to fix layout and allow translations to be caught in routing --- .../welsh/add-welsh-version.html | 1214 +++++++++-------- 1 file changed, 675 insertions(+), 539 deletions(-) diff --git a/app/views/form-designer/welsh/add-welsh-version.html b/app/views/form-designer/welsh/add-welsh-version.html index 4138f071..bb20ddac 100644 --- a/app/views/form-designer/welsh/add-welsh-version.html +++ b/app/views/form-designer/welsh/add-welsh-version.html @@ -12,589 +12,725 @@ {% block content %}
-
-
+ + +
+ {{ data.formTitle or '[formTitle]' }} +

{{ pageTitle }}

+
+
Status
+
+ {{ govukTag({ + text: data['status'], + classes: "govuk-tag--yellow" + }) }} +
+
- {{ data.formTitle or '[formTitle]' }} -

{{ pageTitle }}

-
-
Status
-
- {{ govukTag({ - text: data['status'], - classes: "govuk-tag--yellow" +
+ {{ govukButton({ + text: "Download as a spreadsheet", + classes: "govuk-button--secondary", + name: "action", + value: "download" }) }} -
-
- -
- {{ govukButton({ - text: "Download as a spreadsheet", - classes: "govuk-button--secondary", - name: "action", - value: "download" - }) }} - {% if data.pages.length %} - - Preview this form in Welsh - - {% endif %} + {% if data.pages.length %} + + Preview this form in Welsh + + {% endif %} +
- {# FORM NAME #} - {% set formNameInput -%} - {{ govukInput({ - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh form name", - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-form-name", - name: "welshFormName", - attributes: 'aria-describedby="englishVersion"' - }) }} - {%- endset %} - - {{ govukTable({ - caption: "Form name", - captionClasses: "govuk-table__caption--m", - classes: "app-translate-table", - head: [ - { - text: "English content" - }, - { - text: "Welsh content" - } - ], - rows: [ - [ - { - classes: "app-table-half-width", - text: data.formTitle or '[formTitle]', - attributes: 'id="englishVersion"' +
+ {# FORM NAME #} + {% set formNameCaption = "Form name" %} + {% set formNameLabel = "Enter Welsh " + formNameCaption | lower %} + {% set formNameInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: formNameLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-form-name", + name: "welshFormName", + attributes: { + "aria-describedby": "englishFormName", + "placeholder": formNameLabel + }, + value: data.welshFormName + }) }} + {%- endset %} + {{ govukTable({ + caption: formNameCaption, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + head: [ + { + text: "English content" }, { - classes: "app-table__cell-input", - html: formNameInput + text: "Welsh content" } + ], + rows: [ + [ + { + classes: "app-table-half-width", + text: data.formTitle or '[formTitle]', + attributes: { + id: "englishFormName" + } + }, + { + classes: "app-table__cell-input", + html: formNameInput + } + ] ] - ] - }) }} + }) }} - {# FORM QUESTIONS #} - {% if data.pages.length > 0 %} - {% for question in data.pages %} - {% set pageHeadingInput -%} - {{ govukInput({ - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh page heading", - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-page-heading" + loop.index0, - name: "welshPageHeading" + loop.index0, - attributes: 'aria-describedby="englishPageHeading' + loop.index0 + '"' - }) }} - {%- endset %} - {% set guidanceTextInput -%} - {{ govukTextarea({ - formGroup: { - classes: "app-welsh-form-group" - }, - rows: "10", - label: { - text: "Enter Welsh guidance text", - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-guidance-text" + loop.index0, - name: "welshGuidanceText" + loop.index0, - attributes: 'aria-describedby="englishGuidanceText' + loop.index0 + '"' - }) }} - {%- endset %} - {% set questionTextInput -%} - {{ govukInput({ - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh question text", - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-question-text" + loop.index0, - name: "welshQuestionText" + loop.index0, - attributes: 'aria-describedby="englishVersion' + loop.index0 + '"' - }) }} - {%- endset %} - {% set hintTextInput -%} - {{ govukInput({ - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh hint text", - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-hint-text" + loop.index0, - name: "welshHintText" + loop.index0, - attributes: 'aria-describedby="englishHintText' + loop.index0 + '"' - }) }} - {%- endset %} + {# FORM QUESTIONS #} + {% if data.pages.length > 0 %} + {% for question in data.pages %} + {% set questionCaption = "Question " + loop.index %} - {{ govukTable({ - caption: "Question " + loop.index, - captionClasses: "govuk-table__caption--m", - classes: "app-translate-table", - firstCellIsHeader: true, - head: [ - {}, - { - text: "English content" - }, - { - text: "Welsh content" - } - ], - rows: [ - [ - { - classes: "app-table-one-quarter-width", - text: 'Page heading' - }, - { - classes: "app-table-one-third-width", - text: question['page-name'], - attributes: 'id="englishPageHeading' + loop.index0 + '"' - }, - { - classes: "app-table-one-third-width app-table__cell-input", - html: pageHeadingInput - } - ] if question['additional-guidance'], - [ - { - classes: "app-table-one-quarter-width", - text: 'Guidance text' - }, - { - classes: "app-table-one-third-width", - text: question['additional-guidance-text'], - attributes: 'id="englishGuidanceText' + loop.index0 + '"' - }, - { - classes: "app-table-one-third-width app-table__cell-input", - html: guidanceTextInput - } - ] if question['additional-guidance'], - [ - { - classes: "app-table-one-quarter-width", - text: 'Question text' - }, - { - classes: "app-table-one-third-width", - text: question['long-title'], - attributes: 'id="englishQuestion' + loop.index0 + '"' - }, - { - classes: "app-table-one-third-width app-table__cell-input", - html: questionTextInput - } - ], - [ - { - classes: "app-table-one-quarter-width", - text: 'Hint text' - }, - { - classes: "app-table-one-third-width", - text: question['hint-text'], - attributes: 'id="englishHintText' + loop.index0 + '"' - }, - { - classes: "app-table-one-third-width app-table__cell-input", - html: hintTextInput - } - ] if question['hint-text'] - ] - }) }} - {% endfor %} - {% else %} -

Form questions

-

No questions have been added to the form.

- {% endif %} + {% set pageHeadingLabel = "Enter Welsh question text" %} + {% set pageHeadingInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: pageHeadingLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-page-heading-" + loop.index0, + name: "welshPageHeading[" + loop.index0 + "][page_heading_" + loop.index0 + "]", + attributes: { + "aria-describedby": "englishPageHeading[" + loop.index0 + "]", + "placeholder": pageHeadingLabel + }, + value: question.welsh.page_heading + }) }} + {%- endset %} - {# FORM DECLARATION #} - {% set declarationSubhead = 'Declaration for people to agree to' %} - {% if data.checkAnswersDeclaration and data.checkAnswersDeclaration !== '' %} - {% set checkAnswersDeclarationInput -%} - {{ govukTextarea({ - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh " + declarationSubhead, - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-check-answers-declaration", - name: "welshCheckAnswersDeclaration", - attributes: 'aria-describedby="englishCheckAnswersDeclaration"' - }) }} - {%- endset %} - {{ govukTable({ - caption: declarationSubhead, - captionClasses: "govuk-table__caption--m", - classes: "app-translate-table", - head: [ - { - text: "English content" - }, - { - text: "Welsh content" - } - ], - rows: [ - [ - { - classes: "app-table-one-third-width", - text: data.checkAnswersDeclaration, - attributes: 'id="englishCheckAnswersDeclaration"' + {% set guidanceTextLabel = "Enter Welsh guidance text" %} + {% set guidanceTextInput -%} + {{ govukTextarea({ + rows: "5", + formGroup: { + classes: "app-welsh-form-group" + }, + rows: "10", + label: { + text: guidanceTextLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-guidance-text-" + loop.index0, + name: "welshGuidanceText[" + loop.index0 + "][guidance_text_" + loop.index0 + "]", + attributes: { + "aria-describedby": "englishGuidanceText[" + loop.index0 + "]", + "placeholder": guidanceTextLabel + }, + value: question.welsh.guidance_text + }) }} + {%- endset %} + + {% set questionTextLabel = "Enter Welsh question text" %} + {% set questionTextInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: questionTextLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-question-text-" + loop.index0, + name: "welshQuestionText[" + loop.index0 + "][question_text_" + loop.index0 + "]", + attributes: { + "aria-describedby": "englishQuestionText[" + loop.index0 + "]", + "placeholder": questionTextLabel + }, + value: question.welsh.question_text + }) }} + {%- endset %} + + {% set hintTextLabel = "Enter Welsh hint text" %} + {% set hintTextInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: hintTextLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-hint-text-" + loop.index0, + name: "welshHintText[" + loop.index0 + "][hint_text_" + loop.index0 + "]", + attributes: { + "aria-describedby": "englishHintText[" + loop.index0 + "]", + "placeholder": hintTextLabel + }, + value: question.welsh.hint_text + }) }} + {%- endset %} + + {{ govukTable({ + caption: "Question " + loop.index, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + firstCellIsHeader: true, + head: [ + {}, + { + text: "English content" }, { - classes: "app-table-one-third-width app-table__cell-input", - html: checkAnswersDeclarationInput + text: "Welsh content" } + ], + rows: [ + [ + { + classes: "app-table-one-quarter-width", + text: 'Page heading' + }, + { + classes: "app-table-one-third-width", + text: question['page-name'], + attributes: { + id: "englishPageHeading[" + loop.index0 + "]" + } + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: pageHeadingInput + } + ] if question['additional-guidance'], + [ + { + classes: "app-table-one-quarter-width", + text: 'Guidance text' + }, + { + classes: "app-table-one-third-width", + text: question['additional-guidance-text'], + attributes: { + id: "englishGuidanceText[" + loop.index0 + "]" + } + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: guidanceTextInput + } + ] if question['additional-guidance'], + [ + { + classes: "app-table-one-quarter-width", + text: 'Question text' + }, + { + classes: "app-table-one-third-width", + text: question['long-title'], + attributes: { + id: "englishQuestionText[" + loop.index0 + "]" + } + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: questionTextInput + } + ], + [ + { + classes: "app-table-one-quarter-width", + text: 'Hint text' + }, + { + classes: "app-table-one-third-width", + text: question['hint-text'], + attributes: { + id: "englishHintText[" + loop.index0 + "]" + } + }, + { + classes: "app-table-one-third-width app-table__cell-input", + html: hintTextInput + } + ] if question['hint-text'] ] - ] - }) }} - {% else %} -

{{ declarationSubhead }}

-

No declaration was added to the form.

- {% endif %} + }) }} + {% endfor %} + {% else %} +

Form questions

+

No questions have been added to the form yet.

+ {% endif %} - {# FORM INFORMATION ABOUT WHAT HAPPENS NEXT (WHN) #} - {% set whnSubhead = 'Information about what happens next' %} - {% if data.confirmationNext and data.confirmationNext !== '' %} - {% set confirmationNextInput -%} - {{ govukTextarea({ - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh " + whnSubhead, - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-confirmation-next", - name: "welshConfirmationNext", - attributes: 'aria-describedby="englishConfirmationNext"' - }) }} - {%- endset %} - {{ govukTable({ - caption: whnSubhead, - captionClasses: "govuk-table__caption--m", - classes: "app-translate-table", - head: [ - { - text: "English content" - }, - { - text: "Welsh content" - } - ], - rows: [ - [ - { - classes: "app-table-one-third-width", - text: data.confirmationNext | striptags(true) | escape | nl2br, - attributes: 'id="englishConfirmationNext"' + {# FORM DECLARATION #} + {% set declarationSubhead = 'Declaration for people to agree to' %} + {% set declarationLabel = "Enter Welsh " + declarationSubhead %} + {% if data.checkAnswersDeclaration and data.checkAnswersDeclaration !== '' %} + {% set checkAnswersDeclarationInput -%} + {{ govukTextarea({ + rows: "5", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: declarationLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-check-answers-declaration", + name: "welshCheckAnswersDeclaration", + attributes: { + "aria-describedby": "englishCheckAnswersDeclaration", + "placeholder": declarationLabel + }, + value: data.welshCheckAnswersDeclaration + }) }} + {%- endset %} + {{ govukTable({ + caption: declarationSubhead, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + head: [ + { + text: "English content" }, { - classes: "app-table-one-third-width app-table__cell-input", - html: confirmationNextInput + text: "Welsh content" } + ], + rows: [ + [ + { + classes: "app-table-half-width", + text: data.checkAnswersDeclaration, + attributes: { + id: "englishCheckAnswersDeclaration" + } + }, + { + classes: "app-table__cell-input", + html: checkAnswersDeclarationInput + } + ] ] - ] - }) }} - {% else %} -

{{ whnSubhead }}

-

No information about what happens next was added to the form.

- {% endif %} - - {# FORM PAYMENT LINK #} - {% set paymentLinkSubhead = 'Payment link' %} - {% if data.payments === 'yes' %} -

{{ paymentLinkSubhead }}

-

No payment link has been added to your form.

- {% endif %} + }) }} + {% else %} +

{{ declarationSubhead }}

+

No declaration was added to the form.

+ {% endif %} - {# FORM PRIVACY LINK #} - {% set privacyLinkSubhead = 'Link to privacy information for this form' %} - {% if data.privacyInformation and data.privacyInformation !== '' %} - {% set privacyInformationInput -%} - {{ govukTextarea({ - rows: "1", - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh " + privacyLinkSubhead, - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-privacy-information", - name: "welshPrivacyInformation", - attributes: 'aria-describedby="englishPrivacyInformation"' - }) }} - {%- endset %} - {{ govukTable({ - caption: privacyLinkSubhead, - captionClasses: "govuk-table__caption--m", - classes: "app-translate-table", - head: [ - { - text: "English content" - }, - { - text: "Welsh content" - } - ], - rows: [ - [ - { - classes: "app-table-one-third-width", - text: data.privacyInformation, - attributes: 'id="englishPrivacyInformation"' + {# FORM INFORMATION ABOUT WHAT HAPPENS NEXT (WHN) #} + {% set whnSubhead = 'Information about what happens next' %} + {% set whnLabel = "Enter Welsh " + whnSubhead %} + {% if data.confirmationNext and data.confirmationNext !== '' %} + {% set confirmationNextInput -%} + {{ govukTextarea({ + rows: "5", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: whnLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-confirmation-next", + name: "welshConfirmationNext", + attributes: { + "aria-describedby": "englishConfirmationNext", + "placeholder": whnLabel + }, + value: data.welshConfirmationNext + }) }} + {%- endset %} + {{ govukTable({ + caption: whnSubhead, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + head: [ + { + text: "English content" }, { - classes: "app-table-one-third-width app-table__cell-input", - html: privacyInformationInput + text: "Welsh content" } + ], + rows: [ + [ + { + classes: "app-table-half-width", + text: data.confirmationNext | striptags(true) | escape | nl2br, + attributes: { + id: "englishConfirmationNext" + } + }, + { + classes: "app-table__cell-input", + html: confirmationNextInput + } + ] ] - ] - }) }} - {% else %} -

{{ privacyLinkSubhead }}

-

No contact details for support have been added to the form.

- {% endif %} + }) }} + {% else %} +

{{ whnSubhead }}

+

No information about what happens next was added to the form yet.

+ {% endif %} - {# FORM CONTACT DETAILS FOR SUPPORT #} - {% set supportDetailsSubhead = 'Contact details for support' %} - {% if data.supportDetails %} - {% set emailSupportInput -%} - {{ govukTextarea({ - rows: "1", - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh Email", - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-email-support", - name: "welshEmailSupport", - attributes: 'aria-describedby="englishEmailSupport"' - }) }} - {%- endset %} - {% set phoneSupportInput -%} - {{ govukTextarea({ - rows: "5", - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh Telephone", - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-phone-support", - name: "welshPhoneSupport", - attributes: 'aria-describedby="englishPhoneSupport"' - }) }} - {%- endset %} - {% set onlineLinkTextInputInput -%} - {{ govukTextarea({ - rows: "1", - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh Online link text", - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-online-link-text", - name: "welshOnlineLinkText", - attributes: 'aria-describedby="englishOnlineLinkText"' - }) }} - {%- endset %} - {% set onlineLinkURLInput -%} - {{ govukTextarea({ - rows: "1", - formGroup: { - classes: "app-welsh-form-group" - }, - label: { - text: "Enter Welsh Online link URL", - classes: "govuk-visually-hidden", - isPageHeading: false - }, - id: "welsh-online-link-url", - name: "welshOnlineLinkURL", - attributes: 'aria-describedby="englishOnlineLinkURL"' - }) }} - {%- endset %} - {{ govukTable({ - caption: supportDetailsSubhead, - captionClasses: "govuk-table__caption--m", - classes: "app-translate-table", - firstCellIsHeader: true, - head: [ - {}, - { - text: "English content" - }, - { - text: "Welsh content" - } - ], - rows: [ - [ - { - text: 'Email' - }, - { - classes: "app-table-one-third-width", - text: data.emailSupport, - attributes: 'id="englishEmailSupport"' - }, - { - classes: "app-table-one-third-width app-table__cell-input", - html: emailSupportInput - } - ] if 'email' in data.supportDetails, - [ - { - text: 'Telephone' - }, - { - classes: "app-table-one-third-width", - text: data.phoneSupport | striptags(true) | escape | nl2br, - attributes: 'id="englishPhoneSupport"' - }, - { - classes: "app-table-one-third-width app-table__cell-input", - html: phoneSupportInput - } - ] if 'phone' in data.supportDetails, - [ - { - text: 'Online link text' - }, - { - classes: "app-table-one-third-width", - text: data.onlineSupportText, - attributes: 'id="englishOnlineLinkText"' - }, - { - classes: "app-table-one-third-width app-table__cell-input", - html: onlineLinkTextInput - } - ] if 'online' in data.supportDetails, - [ - { - text: 'Online link URL' - }, - { - classes: "app-table-one-third-width", - text: data.onlineSupportLink, - attributes: 'id="englishOnlineLinkURL"' + {# FORM PAYMENT LINK #} + {% set paymentLinkSubhead = 'Payment link' %} + {% set paymentLinkLabel = "Enter Welsh " + paymentLinkSubhead %} + {% if data.paymentLink and data.paymentLink !== '' %} + {% set paymentLinkInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: paymentLinkLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-payment-link", + name: "welshPaymentLink", + attributes: { + "aria-describedby": "englishPaymentLink", + "placeholder": paymentLinkLabel + }, + value: data.welshPaymentLink + }) }} + {%- endset %} + {{ govukTable({ + caption: paymentLinkSubhead, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + head: [ + { + text: "English content" }, { - classes: "app-table-one-third-width app-table__cell-input", - html: onlineLinkURLInput + text: "Welsh content" } - ] if 'online' in data.supportDetails - ] - }) }} - {% else %} -

{{ supportDetailsSubhead }}

-

No contact details for support have been added to the form.

- {% endif %} + ], + rows: [ + [ + { + classes: "app-table-half-width", + text: data.paymentLink, + attributes: { + id: "englishPaymentLink" + } + }, + { + classes: "app-table__cell-input", + html: paymentLinkInput + } + ] + ] + }) }} + {% else %} +

{{ paymentLinkSubhead }}

+

No payment link has been added to your form.

+ {% endif %} - {# - {% if (data.isQuestionsComplete == 'yes') and - (data.isDeclarationComplete == 'yes') and - (data.confirmationNext and data.confirmationNext !== '') and - (data.privacyInformation and data.privacyInformation !== '') and - (data.supportDetails and data.supportDetails.length > 0) -%} - {{ govukRadios({ - classes: "govuk-radios", - name: "markWelshComplete", - fieldset: { - legend: { - text: "Have you finished adding your Welsh version?", - isPageHeading: false, - classes: "govuk-fieldset__legend--m" - } + {# FORM PRIVACY LINK #} + {% set privacyInformationSubhead = "Link to privacy information for this form" %} + {% set privacyInformationLabel = "Enter Welsh " + privacyLinkSubhead %} + {% if data.privacyInformation and data.privacyInformation !== '' %} + {% set privacyInformationInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" }, - hint: { - text: "Selecting ‘Yes’ will mark this task as complete. You’ll still be able to make more changes if you need to." + label: { + text: privacyInformationLabel, + classes: "govuk-visually-hidden", + isPageHeading: false }, - items: [ - { - value: "yes", - text: "Yes" + id: "welsh-privacy-information", + name: "welshPrivacyInformation", + attributes: { + "aria-describedby": "englishPrivacyInformation", + "placeholder": privacyInformationLabel + }, + value: data.welshPrivacyInformation + }) }} + {%- endset %} + {{ govukTable({ + caption: privacyInformationSubhead, + captionClasses: "govuk-table__caption--m", + classes: "app-translate-table", + head: [ + { + text: "English content" }, { - value: "no", - text: "No, I’ll come back later" + text: "Welsh content" } ], - errorMessage: { text: errors['markWelshComplete'].text } if errors['markWelshComplete'].text + rows: [ + [ + { + classes: "app-table-half-width", + text: data.privacyInformation, + attributes: { + id: "englishPrivacyInformation" + } + }, + { + classes: "app-table__cell-input", + html: privacyInformationInput + } + ] + ] }) }} - {%- endif %} - #} - {{ govukButton({ - text: "Save and continue", - name: "action", - value: "continue" - }) }} - + {% else %} +

{{ privacyInformationSubhead }}

+

No contact details for support have been added to the form yet.

+ {% endif %} + {# FORM CONTACT DETAILS FOR SUPPORT #} + {% set supportDetailsSubhead = "Contact details for support" %} -
-
+ {% set emailSupportLabel = "Enter Welsh Email" %} + {% if data.supportDetails %} + {% set emailSupportInput -%} + {{ govukTextarea({ + rows: "1", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: emailSupportLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-email-support", + name: "welshEmailSupport", + attributes: { + "aria-describedby": "englishEmailSupport", + "placeholder": emailSupportLabel + }, + value: data.welshEmailSupport + }) }} + {%- endset %} -{% endblock %} + {% set phoneSupportLabel = "Enter Welsh Telephone" %} + {% set phoneSupportInput -%} + {{ govukTextarea({ + rows: "5", + formGroup: { + classes: "app-welsh-form-group" + }, + label: { + text: phoneSupportLabel, + classes: "govuk-visually-hidden", + isPageHeading: false + }, + id: "welsh-phone-support", + name: "welshPhoneSupport", + attributes: { + "aria-describedby": "englishPhoneSupport", + "placeholder": phoneSupportLabel + }, + value: data.welshPhoneSupport + }) }} + {%- endset %} -{% block pageScripts %} - {% endblock %} + +{% block pageScripts %}{% endblock %} From 697e605381123ed48f67b96467a5506a9f57ea95 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Mon, 27 Oct 2025 16:41:39 +0000 Subject: [PATCH 35/37] Remove commented makr as save radios --- app/views/form-designer/welsh/add-welsh-version.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/form-designer/welsh/add-welsh-version.html b/app/views/form-designer/welsh/add-welsh-version.html index bb20ddac..37d01934 100644 --- a/app/views/form-designer/welsh/add-welsh-version.html +++ b/app/views/form-designer/welsh/add-welsh-version.html @@ -689,7 +689,6 @@

{{ supportDetailsSubhead }}

- {# {% if (data.isQuestionsComplete == 'yes') and (data.isDeclarationComplete == 'yes') and (data.confirmationNext and data.confirmationNext !== '') and @@ -721,7 +720,7 @@

{{ supportDetailsSubhead }}

errorMessage: { text: errors['markWelshComplete'].text } if errors['markWelshComplete'].text }) }} {%- endif %} - #} + {{ govukButton({ text: "Save and continue", name: "action", From 7f744d9d4cb1cc66318860907cefb6e6c7840fd0 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Mon, 27 Oct 2025 16:42:06 +0000 Subject: [PATCH 36/37] Updated status tag for Welsh task --- .../partials/status-draft-form.html | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/views/form-designer/partials/status-draft-form.html b/app/views/form-designer/partials/status-draft-form.html index 5c97bbbf..4cde6a28 100644 --- a/app/views/form-designer/partials/status-draft-form.html +++ b/app/views/form-designer/partials/status-draft-form.html @@ -351,12 +351,24 @@

}) }} {# SET STATUS OF WELSH VERSION #} -{% if data.welshVersion %} +{% if data.markWelshComplete and (data.markWelshComplete == 'yes') %} {% set welshVersionStatusText = 'Completed' %} +{% elif data.markWelshComplete and (data.markWelshComplete == 'no') %} + {% set welshVersionStatusTag = 'govuk-tag--light-blue' %} + {% set welshVersionStatusText = 'In progress' %} {% else %} {% set welshVersionStatusTag = 'govuk-task-list__status--cannot-start-yet' %} {% set welshVersionStatusText = 'Optional' %} {% endif%} +{% set htmlWelshVersion %} + {% if not (data.markWelshComplete) or (data.markWelshComplete == 'yes') %} + {{ welshVersionStatusText }} + {% else %} + + {{ welshVersionStatusText }} + + {% endif %} +{% endset %}

4. Create a Welsh version of your form (optional)

{{ govukTaskList({ idPrefix: "add-welsh-version", @@ -367,8 +379,8 @@

4. Create a Welsh version of your form (optional) Date: Mon, 27 Oct 2025 16:42:59 +0000 Subject: [PATCH 37/37] Preparing for Welsh status tag to work when creator adds any content to Welsh page --- app/routes.js | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/app/routes.js b/app/routes.js index 20e4529b..5698a118 100644 --- a/app/routes.js +++ b/app/routes.js @@ -202,6 +202,10 @@ router.get('/form-designer/your-form', function (req, res) { if (req.session.data['supportDetails']) { sections = sections + 1 } + // if what happens next completed = sections =+ 1 + if (req.session.data['markWelshComplete']) { + sections = sections + 1 + } return res.render('form-designer/your-form', { successMessage: successMessage, @@ -967,7 +971,7 @@ 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, welshPageHeading, welshGuidanceText, welshQuestionText, welshHintText, pages } = req.session.data + var { welshFormName, welshPageHeading, welshGuidanceText, welshQuestionText, welshHintText, pages, welshConfirmationNext, welshPaymentLink, welshPrivacyInformation, supportDetails, welshEmailSupport, welshPhoneSupport, welshOnlineLinkText, welshOnlineLinkURL } = req.session.data for (let i = 0; i < pages.length; i++) { // run through all the current pages added to the English form @@ -1032,8 +1036,45 @@ router.post('/form-designer/welsh/add-welsh-version', function (req, res) { if (welshFormName) { // set a success message for saving req.session.data.successMessage = 'Your Welsh version has been saved' + // add ‘no’ to session data + req.session.data.markWelshComplete = "no" } + /* + if any Welsh input has been added we need to mark the Welsh task as ‘in progress’ + if (welshQuestionText > 0) { + // add ‘no’ to session data + // req.session.data.markWelshComplete = "no" + } + + if (welshDeclaration) { + // add ‘no’ to session data + // req.session.data.markWelshComplete = "no" + } + + if (welshConfirmationNext) { + // add ‘no’ to session data + // req.session.data.markWelshComplete = "no" + } + + if (welshPaymentLink) { + // add ‘no’ to session data + // req.session.data.markWelshComplete = "no" + } + + if (welshPrivacyLink) { + // add ‘no’ to session data + // req.session.data.markWelshComplete = "no" + } + + if (supportDetails) { + if (welshEmailSupport || welshPhoneSupport || welshOnlineLinkText || welshOnlineLinkURL ) { + // add ‘no’ to session data + // req.session.data.markWelshComplete = "no" + } + } + */ + return res.redirect('../your-form') })