Skip to content

Commit dfef96c

Browse files
Fix nested query strings and section statuses (#162)
1 parent 7fb6353 commit dfef96c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ app.use(locals(config))
225225
app.set('view engine', 'html')
226226
exampleTemplatesApp.set('view engine', 'html')
227227

228+
// Support for parsing nested query strings
229+
// https://github.com/nhsuk/nhsuk-prototype-kit/issues/644
230+
app.set('query parser', 'extended')
231+
228232
// This setting trusts the X-Forwarded headers set by
229233
// a proxy and uses them to set the standard header in
230234
// req. This is needed for hosts like Heroku.

app/assets/javascript/expandable-sections.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ document.addEventListener('DOMContentLoaded', function () {
4545
newStatus = 'Complete'
4646
} else if (currentStatus === 'To review') {
4747
newStatus = 'Reviewed'
48+
} else if (currentStatus === 'Reviewed') {
49+
newStatus = 'Reviewed' // Keep as reviewed
4850
} else {
4951
newStatus = 'Complete' // Default fallback
5052
}

0 commit comments

Comments
 (0)