diff --git a/integration-tests/integration/reportPages/check-your-answers.cy.js b/integration-tests/integration/reportPages/check-your-answers.cy.js index 0edbb1de..8c96dace 100644 --- a/integration-tests/integration/reportPages/check-your-answers.cy.js +++ b/integration-tests/integration/reportPages/check-your-answers.cy.js @@ -134,7 +134,7 @@ context('Check your answers page', () => { selectUofReasonsPage.checkReason('FIGHT_BETWEEN_PRISONERS') selectUofReasonsPage.clickSave() const useOfForceDetailsPage = UseOfForceDetailsPage.verifyOnPage() - useOfForceDetailsPage.postiveCommunication().check('false') + useOfForceDetailsPage.positiveCommunication().check('false') operation(useOfForceDetailsPage) const revisitedAnswersPage = CheckAnswersPage.verifyOnPage() revisitedAnswersPage.positiveCommunicationUsed().contains(finalValue) diff --git a/integration-tests/integration/reportPages/enter-use-of-force-details.cy.js b/integration-tests/integration/reportPages/enter-use-of-force-details.cy.js index 1a9019db..05dc650b 100644 --- a/integration-tests/integration/reportPages/enter-use-of-force-details.cy.js +++ b/integration-tests/integration/reportPages/enter-use-of-force-details.cy.js @@ -20,7 +20,7 @@ context('Enter use of force details page', () => { selectUofReasonsPage.clickSaveAndContinue() const useOfForceDetailsPage = UseOfForceDetailsPage.verifyOnPage() - useOfForceDetailsPage.postiveCommunication().check('true') + useOfForceDetailsPage.positiveCommunication().check('true') useOfForceDetailsPage.personalProtectionTechniques().check('true') useOfForceDetailsPage.batonDrawn().check('true') useOfForceDetailsPage.batonUsed().check('true') @@ -28,6 +28,7 @@ context('Enter use of force details page', () => { useOfForceDetailsPage.pavaUsed().check('true') useOfForceDetailsPage.guidingHold().check('true') useOfForceDetailsPage.guidingHoldOfficersInvolved.check('2') + useOfForceDetailsPage.escortingHold().check('true') useOfForceDetailsPage.restraint().check('true') useOfForceDetailsPage.restraintPositions.check(restraintPositions) useOfForceDetailsPage.handcuffsApplied().check('true') @@ -48,6 +49,7 @@ context('Enter use of force details page', () => { batonUsed: true, guidingHold: true, guidingHoldOfficersInvolved: 2, + escortingHold: true, handcuffsApplied: true, pavaDrawn: true, pavaUsed: true, @@ -72,6 +74,7 @@ context('Enter use of force details page', () => { batonUsed: true, guidingHold: true, guidingHoldOfficersInvolved: 2, + escortingHold: true, handcuffsApplied: true, pavaDrawn: true, pavaUsed: true, @@ -92,7 +95,7 @@ context('Enter use of force details page', () => { cy.go('back') const useOfForceDetailsPage = UseOfForceDetailsPage.verifyOnPage() - useOfForceDetailsPage.postiveCommunication().should('have.value', 'true') + useOfForceDetailsPage.positiveCommunication().should('have.value', 'true') useOfForceDetailsPage.personalProtectionTechniques().should('have.value', 'true') useOfForceDetailsPage.batonDrawn().should('have.value', 'true') useOfForceDetailsPage.batonUsed().should('have.value', 'true') @@ -100,6 +103,7 @@ context('Enter use of force details page', () => { useOfForceDetailsPage.pavaUsed().should('have.value', 'true') useOfForceDetailsPage.guidingHold().should('have.value', 'true') useOfForceDetailsPage.guidingHoldOfficersInvolved.two().should('be.checked') + useOfForceDetailsPage.escortingHold().should('have.value', 'true') useOfForceDetailsPage.restraint().should('have.value', 'true') useOfForceDetailsPage.restraintPositions.standing().should('be.checked') useOfForceDetailsPage.restraintPositions.faceDown().should('not.be.checked') @@ -118,12 +122,13 @@ context('Enter use of force details page', () => { selectUofReasonsPage.clickSaveAndContinue() const useOfForceDetailsPage = UseOfForceDetailsPage.verifyOnPage() - useOfForceDetailsPage.postiveCommunication().check('true') + useOfForceDetailsPage.positiveCommunication().check('true') useOfForceDetailsPage.personalProtectionTechniques().check('true') useOfForceDetailsPage.pavaDrawn().check('true') useOfForceDetailsPage.pavaUsed().check('true') useOfForceDetailsPage.guidingHold().check('true') useOfForceDetailsPage.guidingHoldOfficersInvolved.check('2') + useOfForceDetailsPage.escortingHold().check('true') useOfForceDetailsPage.restraint().check('false') useOfForceDetailsPage.handcuffsApplied().check('true') useOfForceDetailsPage.painInducingTechniques().check('true') diff --git a/integration-tests/integration/seedData.js b/integration-tests/integration/seedData.js index f7e96011..998908a0 100644 --- a/integration-tests/integration/seedData.js +++ b/integration-tests/integration/seedData.js @@ -30,6 +30,7 @@ const expectedPayload = { pavaDrawn: true, batonDrawn: true, guidingHold: true, + escortingHold: true, restraint: true, handcuffsApplied: true, restraintPositions: ['STANDING', 'ON_BACK', 'FACE_DOWN', 'KNEELING'], diff --git a/integration-tests/pages/createReport/useOfForceDetailsPage.js b/integration-tests/pages/createReport/useOfForceDetailsPage.js index 26134ca8..8006b975 100644 --- a/integration-tests/pages/createReport/useOfForceDetailsPage.js +++ b/integration-tests/pages/createReport/useOfForceDetailsPage.js @@ -3,20 +3,21 @@ import RelocationAndInjuriesPage from './relocationAndInjuriesPage' const useOfForceDetailsPage = () => page('Use of force details', { - postiveCommunication: () => cy.get('[name="positiveCommunication"]'), + positiveCommunication: () => cy.get('[name="positiveCommunication"]'), personalProtectionTechniques: () => cy.get('[name="personalProtectionTechniques"]'), batonDrawn: () => cy.get('[name="batonDrawn"]'), batonUsed: () => cy.get('[name="batonUsed"]'), pavaDrawn: () => cy.get('[name="pavaDrawn"]'), pavaUsed: () => cy.get('[name="pavaUsed"]'), guidingHold: () => cy.get('[name="guidingHold"]'), - guidingHoldOfficersInvolved: { check: value => cy.get('[name="guidingHoldOfficersInvolved"]').check(value), one: () => cy.get('[name="guidingHoldOfficersInvolved"][value="1"]'), two: () => cy.get('[name="guidingHoldOfficersInvolved"][value="2"]'), }, + escortingHold: () => cy.get('[name="escortingHold"]'), + restraintPositions: { check: value => cy.get('#control-and-restraint [type="checkbox"]').check(value), standing: () => cy.get('#control-and-restraint [type="checkbox"][value="STANDING"]'), @@ -43,7 +44,7 @@ const useOfForceDetailsPage = () => }, fillForm() { - this.postiveCommunication().check('true') + this.positiveCommunication().check('true') this.personalProtectionTechniques().check('true') this.batonDrawn().check('true') this.batonUsed().check('true') @@ -51,6 +52,7 @@ const useOfForceDetailsPage = () => this.pavaUsed().check('true') this.guidingHold().check('true') this.guidingHoldOfficersInvolved.check('2') + this.escortingHold().check('true') this.restraint().check('true') this.restraintPositions.check(['STANDING', 'ON_BACK', 'FACE_DOWN', 'KNEELING']) this.handcuffsApplied().check('true') diff --git a/integration-tests/pages/sections/reportDetails.js b/integration-tests/pages/sections/reportDetails.js index d53b7f94..d8e92c05 100644 --- a/integration-tests/pages/sections/reportDetails.js +++ b/integration-tests/pages/sections/reportDetails.js @@ -62,6 +62,7 @@ module.exports = { cy.get('[data-qa="batonDrawn"]').contains('Yes and used') cy.get('[data-qa="pavaDrawn"]').contains('Yes and used') cy.get('[data-qa="guidingHold"]').contains('Yes - 2 officers involved') + cy.get('[data-qa="escortingHold"]').contains('Yes') cy.get('[data-qa="restraintUsed"]').contains('Yes - standing, on back (supine), on front (prone), kneeling') handcuffsApplied().contains('Yes') painInducingTechniques().contains('Yes') diff --git a/package-lock.json b/package-lock.json index aeabd236..143c6fe8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -84,7 +84,7 @@ "mocha": "^10.2.0", "mocha-junit-reporter": "^2.2.0", "nock": "^13.3.1", - "node-sass": "^8.0.0", + "node-sass": "^9.0.0", "nodemon": "^3.0.1", "prettier": "^2.8.8", "supertest": "^6.3.3", @@ -9633,9 +9633,9 @@ "dev": true }, "node_modules/node-sass": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-8.0.0.tgz", - "integrity": "sha512-jPzqCF2/e6JXw6r3VxfIqYc8tKQdkj5Z/BDATYyG6FL6b/LuYBNFGFVhus0mthcWifHm/JzBpKAd+3eXsWeK/A==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-9.0.0.tgz", + "integrity": "sha512-yltEuuLrfH6M7Pq2gAj5B6Zm7m+gdZoG66wTqG6mIZV/zijq3M2OO2HswtT6oBspPyFhHDcaxWpsBm0fRNDHPg==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -9658,7 +9658,7 @@ "node-sass": "bin/node-sass" }, "engines": { - "node": ">=14" + "node": ">=16" } }, "node_modules/nodemon": { diff --git a/package.json b/package.json index 580a2e27..498cea73 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "mocha": "^10.2.0", "mocha-junit-reporter": "^2.2.0", "nock": "^13.3.1", - "node-sass": "^8.0.0", + "node-sass": "^9.0.0", "nodemon": "^3.0.1", "prettier": "^2.8.8", "supertest": "^6.3.3", diff --git a/server/config/forms/useOfForceDetailsForm.js b/server/config/forms/useOfForceDetailsForm.js index 5cc5859f..39ac0e6d 100644 --- a/server/config/forms/useOfForceDetailsForm.js +++ b/server/config/forms/useOfForceDetailsForm.js @@ -40,6 +40,8 @@ const completeSchema = joi.object({ otherwise: joi.any().strip(), }), + escortingHold: requiredBooleanMsg('Select yes if an escorting hold was used').alter(optionalForPartialValidation), + restraint: requiredBooleanMsg('Select yes if control and restraint was used').alter(optionalForPartialValidation), restraintPositions: joi.when('restraint', { diff --git a/server/config/forms/useOfForceDetailsValidation.test.js b/server/config/forms/useOfForceDetailsValidation.test.js index ed476740..44ff3a65 100644 --- a/server/config/forms/useOfForceDetailsValidation.test.js +++ b/server/config/forms/useOfForceDetailsValidation.test.js @@ -18,6 +18,7 @@ beforeEach(() => { pavaUsed: 'true', guidingHold: 'true', guidingHoldOfficersInvolved: '2', + escortingHold: 'true', restraint: 'true', restraintPositions: ['STANDING', 'FACE_DOWN'], handcuffsApplied: 'true', @@ -44,6 +45,7 @@ describe('complete schema', () => { pavaUsed: true, guidingHold: true, guidingHoldOfficersInvolved: 2, + escortingHold: true, restraint: true, restraintPositions: ['STANDING', 'FACE_DOWN'], handcuffsApplied: true, @@ -52,7 +54,7 @@ describe('complete schema', () => { }) }) - it('Should return 8 error massages if no input field is completed', () => { + it('Should return 9 error massages if no input field is completed', () => { const input = {} const { errors, formResponse } = check(input) @@ -77,6 +79,10 @@ describe('complete schema', () => { href: '#guidingHold', text: 'Select yes if a guiding hold was used', }, + { + href: '#escortingHold', + text: 'Select yes if an escorting hold was used', + }, { href: '#restraint', text: 'Select yes if control and restraint was used', @@ -91,7 +97,7 @@ describe('complete schema', () => { }, ]) - expect(errors.length).toEqual(8) + expect(errors.length).toEqual(9) expect(formResponse).toEqual({}) }) @@ -240,6 +246,22 @@ describe('complete schema', () => { expect(formResponse.guidingHoldOfficersInvolved).toEqual(2) }) + it("Not selecting an option for 'escorting hold' returns validation error message plus 'how many officers involved' is undefined", () => { + const input = { + ...validInput, + escortingHold: undefined, + } + const { errors, formResponse } = check(input) + + expect(errors).toEqual([ + { + href: '#escortingHold', + text: 'Select yes if an escorting hold was used', + }, + ]) + expect(formResponse.escortingHold).toEqual(undefined) + }) + it("Not selecting an option for 'restraint'returns a validation error message plus 'restraint positions' is undefined", () => { const input = { ...validInput, @@ -393,6 +415,7 @@ describe('partial schema', () => { pavaUsed: true, guidingHold: true, guidingHoldOfficersInvolved: 2, + escortingHold: true, restraint: true, restraintPositions: ['STANDING', 'FACE_DOWN'], handcuffsApplied: true, @@ -415,6 +438,7 @@ describe('partial schema', () => { batonDrawn: 'true', pavaDrawn: 'true', guidingHold: 'true', + escortingHold: 'true', restraint: 'true', restraintPositions: [], }) @@ -423,6 +447,7 @@ describe('partial schema', () => { expect(formResponse).toEqual({ batonDrawn: true, guidingHold: true, + escortingHold: true, pavaDrawn: true, restraint: true, }) diff --git a/server/data/UseOfForceReport.ts b/server/data/UseOfForceReport.ts index 5dd771af..12cbc92c 100644 --- a/server/data/UseOfForceReport.ts +++ b/server/data/UseOfForceReport.ts @@ -14,6 +14,7 @@ export type UseOfForceDetails = { pavaUsed: boolean guidingHold: boolean guidingHoldOfficersInvolved: number + escortingHold?: boolean restraint: boolean restraintPositions: string[] handcuffsApplied: boolean diff --git a/server/routes/creatingReports/checkYourAnswers.test.ts b/server/routes/creatingReports/checkYourAnswers.test.ts index 9072376d..4d10704d 100644 --- a/server/routes/creatingReports/checkYourAnswers.test.ts +++ b/server/routes/creatingReports/checkYourAnswers.test.ts @@ -57,6 +57,7 @@ describe('GET /check-your-answers', () => { restraint: false, batonDrawn: false, guidingHold: false, + escortingHold: false, handcuffsApplied: false, positiveCommunication: false, personalProtectionTechniques: false, diff --git a/server/routes/creatingReports/createReport.test.ts b/server/routes/creatingReports/createReport.test.ts index 8e4386fd..16a5b0ea 100644 --- a/server/routes/creatingReports/createReport.test.ts +++ b/server/routes/creatingReports/createReport.test.ts @@ -43,6 +43,7 @@ const validUseOfForceDetailsRequest = { batonDrawn: 'false', pavaDrawn: 'false', guidingHold: 'false', + escortingHold: 'false', restraint: 'false', painInducingTechniques: 'false', handcuffsApplied: 'false', @@ -56,6 +57,7 @@ const validUseofForceDetailUpdate = [ { batonDrawn: false, guidingHold: false, + escortingHold: false, handcuffsApplied: false, painInducingTechniques: false, pavaDrawn: false, @@ -112,6 +114,7 @@ describe('POST save and return to tasklist', () => { expect(draftReportService.process).toBeCalledTimes(1) expect(draftReportService.process).toBeCalledWith(user, 1, 'useOfForceDetails', { guidingHold: false, + escortingHold: false, handcuffsApplied: false, painInducingTechniques: false, pavaDrawn: false, diff --git a/server/services/drafts/reportStatusChecker.test.ts b/server/services/drafts/reportStatusChecker.test.ts index 78eaf516..97b8366b 100644 --- a/server/services/drafts/reportStatusChecker.test.ts +++ b/server/services/drafts/reportStatusChecker.test.ts @@ -17,6 +17,7 @@ describe('statusCheck', () => { restraint: false, batonDrawn: false, guidingHold: false, + escortingHold: false, handcuffsApplied: false, positiveCommunication: false, personalProtectionTechniques: true, @@ -105,6 +106,7 @@ describe('statusCheck', () => { restraint: false, batonDrawn: null, guidingHold: false, + escortingHold: false, handcuffsApplied: null, positiveCommunication: false, personalProtectionTechniques: undefined, diff --git a/server/services/reportDetailBuilder.test.ts b/server/services/reportDetailBuilder.test.ts index b7e733ed..148903fd 100644 --- a/server/services/reportDetailBuilder.test.ts +++ b/server/services/reportDetailBuilder.test.ts @@ -110,6 +110,7 @@ describe('Build details', () => { batonDrawn: undefined, controlAndRestraintUsed: undefined, guidingHoldUsed: undefined, + escortingHoldUsed: undefined, handcuffsApplied: undefined, painInducingTechniques: undefined, pavaDrawn: undefined, diff --git a/server/services/reportSummary.ts b/server/services/reportSummary.ts index a23302cc..0ddb3658 100644 --- a/server/services/reportSummary.ts +++ b/server/services/reportSummary.ts @@ -61,6 +61,7 @@ const createUseOfForceDetails = ( guidingHoldUsed: whenPresent(details.guidingHold, value => value ? howManyOfficersInvolved(details.guidingHoldOfficersInvolved) : NO ), + escortingHoldUsed: details.escortingHold, controlAndRestraintUsed: whenPresent(details.restraint, value => value === true && details.restraintPositions ? getRestraintPositions(details.restraintPositions) : NO ), diff --git a/server/views/formPages/addingStaff/delete-staff-member.html b/server/views/formPages/addingStaff/delete-staff-member.html index f2df6715..afb6e133 100644 --- a/server/views/formPages/addingStaff/delete-staff-member.html +++ b/server/views/formPages/addingStaff/delete-staff-member.html @@ -3,7 +3,7 @@ {% from "govuk/components/radios/macro.njk" import govukRadios %} {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} -{% set pageTitle = 'Are you sure you want to delete staff member?' %} +{% set pageTitle = 'Are you sure you want to delete staff member?' %} {% block content %}
diff --git a/server/views/formPages/addingStaff/select-staff-member.html b/server/views/formPages/addingStaff/select-staff-member.html index 9a44bc82..84bd8b0a 100644 --- a/server/views/formPages/addingStaff/select-staff-member.html +++ b/server/views/formPages/addingStaff/select-staff-member.html @@ -4,7 +4,7 @@ {% from "govuk/components/radios/macro.njk" import govukRadios %} {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} -{% set pageTitle = 'There is more than 1 person with that name' %} +{% set pageTitle = 'There is more than 1 person with that name' %} {% block content %}
diff --git a/server/views/formPages/addingStaff/staff-involved.html b/server/views/formPages/addingStaff/staff-involved.html index 130b3012..1761ffa0 100644 --- a/server/views/formPages/addingStaff/staff-involved.html +++ b/server/views/formPages/addingStaff/staff-involved.html @@ -5,7 +5,7 @@ {% from "govuk/components/table/macro.njk" import govukTable %} {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} -{% set pageTitle = 'Staff involved in use of force' %} +{% set pageTitle = 'Staff involved in use of force' %} {% block formItems %}
diff --git a/server/views/formPages/addingStaff/staff-member-name.html b/server/views/formPages/addingStaff/staff-member-name.html index 0d14772b..0216c167 100644 --- a/server/views/formPages/addingStaff/staff-member-name.html +++ b/server/views/formPages/addingStaff/staff-member-name.html @@ -5,7 +5,7 @@ {% from "govuk/components/fieldset/macro.njk" import govukFieldset %} {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} -{% set pageTitle = "What is the staff member's name?" %} +{% set pageTitle = "What is the staff member's name?" %} {% block content %}
diff --git a/server/views/formPages/addingStaff/staff-member-not-found.html b/server/views/formPages/addingStaff/staff-member-not-found.html index 053d4661..7f6136c4 100644 --- a/server/views/formPages/addingStaff/staff-member-not-found.html +++ b/server/views/formPages/addingStaff/staff-member-not-found.html @@ -1,7 +1,7 @@ {% extends "../../partials/layout.html" %} {% from "govuk/components/button/macro.njk" import govukButton %} -{% set pageTitle = name + ' cannot be found' %} +{% set pageTitle = name + ' cannot be found' %} {% block content %}
diff --git a/server/views/formPages/formTemplate.html b/server/views/formPages/formTemplate.html index 43475f05..5f2816ca 100644 --- a/server/views/formPages/formTemplate.html +++ b/server/views/formPages/formTemplate.html @@ -4,9 +4,9 @@ {% from "govuk/components/button/macro.njk" import govukButton %} {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} -{% set showCancelEditButton = showCancelEditButton | default(true) %} -{% set showSaveAndReturnButton = showSaveAndReturnButton | default(true) %} -{% set saveButtonInEditModeText = saveButtonInEditModeText | default('Save') %} +{% set showCancelEditButton = showCancelEditButton | default(true) %} +{% set showSaveAndReturnButton = showSaveAndReturnButton | default(true) %} +{% set saveButtonInEditModeText = saveButtonInEditModeText | default('Save') %} {% block content %} diff --git a/server/views/formPages/incident/changePrison.html b/server/views/formPages/incident/changePrison.html index 41715c60..67a5bdb5 100644 --- a/server/views/formPages/incident/changePrison.html +++ b/server/views/formPages/incident/changePrison.html @@ -14,7 +14,7 @@ - {% set pageTitle = 'What prison did the use of force take place in?' %} + {% set pageTitle = 'What prison did the use of force take place in?' %}
diff --git a/server/views/formPages/incident/evidence.html b/server/views/formPages/incident/evidence.html index 514638d0..75df3da5 100644 --- a/server/views/formPages/incident/evidence.html +++ b/server/views/formPages/incident/evidence.html @@ -8,12 +8,12 @@ {% from "govuk/components/button/macro.njk" import govukButton %} {% from "govuk/components/textarea/macro.njk" import govukTextarea %} -{% set pageTitle = 'Evidence' %} +{% set pageTitle = 'Evidence' %} {% block formItems %}
-

{{ pageTitle }} 

+

{{ pageTitle }}

@@ -126,7 +126,7 @@

Injuries sustained and healthca
- Did a member of staff need medical attention at the time + Did a member of staff need medical attention at the time? Error: diff --git a/server/views/formPages/incident/report-cancelled.html b/server/views/formPages/incident/report-cancelled.html index d8e8526f..9bc504b7 100644 --- a/server/views/formPages/incident/report-cancelled.html +++ b/server/views/formPages/incident/report-cancelled.html @@ -1,6 +1,6 @@ {% extends "../../partials/layout.html" %} {% from "govuk/components/button/macro.njk" import govukButton %} -{% set pageTitle = 'Your report has been cancelled' %} +{% set pageTitle = 'Your report has been cancelled' %} {% block content %}
diff --git a/server/views/formPages/incident/report-has-been-deleted.html b/server/views/formPages/incident/report-has-been-deleted.html index 179db600..2b8562c9 100644 --- a/server/views/formPages/incident/report-has-been-deleted.html +++ b/server/views/formPages/incident/report-has-been-deleted.html @@ -1,6 +1,6 @@ {% extends "../../partials/layout.html" %} {% from "govuk/components/button/macro.njk" import govukButton %} -{% set pageTitle = 'This report has been deleted' %} +{% set pageTitle = 'This report has been deleted' %} {% block content %}
diff --git a/server/views/formPages/incident/select-primary-uof-reason.html b/server/views/formPages/incident/select-primary-uof-reason.html index ebaa5b8a..a91a67ef 100644 --- a/server/views/formPages/incident/select-primary-uof-reason.html +++ b/server/views/formPages/incident/select-primary-uof-reason.html @@ -2,7 +2,7 @@ {% from "govuk/components/radios/macro.njk" import govukRadios %} {% from "govuk/components/button/macro.njk" import govukButton %} -{% set pageTitle = 'Use of force details' %} +{% set pageTitle = 'Use of force details' %} {% set showCancelEditButton = false %} {% set showSaveAndReturnButton = false %} diff --git a/server/views/formPages/incident/select-uof-reasons.html b/server/views/formPages/incident/select-uof-reasons.html index 172ca674..7446b8c7 100644 --- a/server/views/formPages/incident/select-uof-reasons.html +++ b/server/views/formPages/incident/select-uof-reasons.html @@ -2,7 +2,7 @@ {% from "govuk/components/checkboxes/macro.njk" import govukCheckboxes %} {% from "govuk/components/button/macro.njk" import govukButton %} -{% set pageTitle = 'Use of force details - why was use of force applied?' %} +{% set pageTitle = 'Use of force details - why was use of force applied?' %} {% set saveButtonInEditModeText = 'Save and continue' %} {% block formItems %} diff --git a/server/views/formPages/incident/useOfForceDetails.html b/server/views/formPages/incident/useOfForceDetails.html index 530512c7..5a241856 100644 --- a/server/views/formPages/incident/useOfForceDetails.html +++ b/server/views/formPages/incident/useOfForceDetails.html @@ -113,6 +113,15 @@

{{ pageTitle }}

)}} + {{ incidentMacro.radio( { + text: "Was an escorting hold used?", + name: "escortingHold", + value: data.escortingHold, + options: yesNoOptions, + errorMessage: errors | findError('escortingHold') + })}} + +
{{ incidentMacro.radiosWithNestedCheckboxes({ primaryQuestion: { @@ -133,7 +142,7 @@

{{ pageTitle }}

}}
- +
{{ incidentMacro.radiosWithNestedCheckboxes({ primaryQuestion: { @@ -154,7 +163,7 @@

{{ pageTitle }}

}}
- + {{ incidentMacro.radio( { text: "Were handcuffs applied?", name: "handcuffsApplied", diff --git a/server/views/pages/check-your-answers.html b/server/views/pages/check-your-answers.html index a36acabb..f80b4d22 100644 --- a/server/views/pages/check-your-answers.html +++ b/server/views/pages/check-your-answers.html @@ -2,7 +2,7 @@ {% from "govuk/components/button/macro.njk" import govukButton %} {% import "./reportDetailMacro.njk" as reportDetail %} -{% set pageTitle = 'Check your answers before sending the report' %} +{% set pageTitle = 'Check your answers before sending the report' %} {% block content %} diff --git a/server/views/pages/coordinator/add-involved-staff/already-exists.html b/server/views/pages/coordinator/add-involved-staff/already-exists.html index 87767658..a0b22934 100644 --- a/server/views/pages/coordinator/add-involved-staff/already-exists.html +++ b/server/views/pages/coordinator/add-involved-staff/already-exists.html @@ -2,7 +2,7 @@ {% from "govuk/components/button/macro.njk" import govukButton %} -{% set pageTitle = name + ' has already been added to the report' %} +{% set pageTitle = name + ' has already been added to the report' %} {% block content %} diff --git a/server/views/pages/coordinator/add-involved-staff/missing.html b/server/views/pages/coordinator/add-involved-staff/missing.html index 65d316d9..5a8dc128 100644 --- a/server/views/pages/coordinator/add-involved-staff/missing.html +++ b/server/views/pages/coordinator/add-involved-staff/missing.html @@ -2,7 +2,7 @@ {% from "govuk/components/button/macro.njk" import govukButton %} -{% set pageTitle = 'The username does not exist' %} +{% set pageTitle = 'The username does not exist' %} {% block content %} diff --git a/server/views/pages/coordinator/add-involved-staff/unverified.html b/server/views/pages/coordinator/add-involved-staff/unverified.html index 248e31ec..181c708e 100644 --- a/server/views/pages/coordinator/add-involved-staff/unverified.html +++ b/server/views/pages/coordinator/add-involved-staff/unverified.html @@ -2,7 +2,7 @@ {% from "govuk/components/button/macro.njk" import govukButton %} -{% set pageTitle = name + ' has not verified their email address' %} +{% set pageTitle = name + ' has not verified their email address' %} {% block content %} diff --git a/server/views/pages/error.html b/server/views/pages/error.html index 3d11b89d..1e336449 100755 --- a/server/views/pages/error.html +++ b/server/views/pages/error.html @@ -1,6 +1,6 @@ {% extends "../partials/layout.html" %} -{% set pageTitle = message %} +{% set pageTitle = message %} {% block content %} diff --git a/server/views/pages/report-sent.html b/server/views/pages/report-sent.html index 3535ccc0..967c5d54 100644 --- a/server/views/pages/report-sent.html +++ b/server/views/pages/report-sent.html @@ -1,7 +1,7 @@ {% extends "../partials/layout.html" %} {% from "govuk/components/button/macro.njk" import govukButton %} -{% set pageTitle = 'This report has been sent to the use of force coordinator' %} +{% set pageTitle = 'This report has been sent to the use of force coordinator' %} {% block content %}
diff --git a/server/views/pages/report-use-of-force.html b/server/views/pages/report-use-of-force.html index 0bcf3ac5..248c3af6 100644 --- a/server/views/pages/report-use-of-force.html +++ b/server/views/pages/report-use-of-force.html @@ -2,7 +2,7 @@ {% from "govuk/components/back-link/macro.njk" import govukBackLink %} {% from "govuk/components/notification-banner/macro.njk" import govukNotificationBanner %} -{% set pageTitle = 'Report use of force' %} +{% set pageTitle = 'Report use of force' %} {% block beforeContent %} {{ govukBreadcrumbs({ diff --git a/server/views/pages/reportDetailMacro.njk b/server/views/pages/reportDetailMacro.njk index f5cd5dab..72fd4cb4 100644 --- a/server/views/pages/reportDetailMacro.njk +++ b/server/views/pages/reportDetailMacro.njk @@ -212,6 +212,16 @@ print: print }) }} + {% if data.useOfForceDetails.escortingHoldUsed != undefined %} + {{ + reportDetailsMacros.tableRow({ + label: 'Was an escorting hold used?', + 'data-qa': 'escortingHold', + dataValue: data.useOfForceDetails.escortingHoldUsed | toYesNo, + print: print + }) + }} + {% endif %} {{ reportDetailsMacros.tableRow({ label: 'Was control and restraint used?', diff --git a/server/views/pages/search-for-prisoner.html b/server/views/pages/search-for-prisoner.html index e6a99f3e..86292631 100644 --- a/server/views/pages/search-for-prisoner.html +++ b/server/views/pages/search-for-prisoner.html @@ -6,7 +6,7 @@ {% from "govuk/components/table/macro.njk" import govukTable %} {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} -{% set pageTitle = 'Search for a prisoner' %} +{% set pageTitle = 'Search for a prisoner' %} {% block content %} diff --git a/server/views/pages/statement/add-comment-to-statement.html b/server/views/pages/statement/add-comment-to-statement.html index a7560e22..c4cfbd8f 100644 --- a/server/views/pages/statement/add-comment-to-statement.html +++ b/server/views/pages/statement/add-comment-to-statement.html @@ -8,7 +8,7 @@ {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} {% import "../statementDetailMacro.njk" as statementDetail %} -{% set pageTitle = 'Add a comment to your statement' %} +{% set pageTitle = 'Add a comment to your statement' %} {% block beforeContent %} {% include "../../partials/breadcrumbs.njk" %} diff --git a/server/views/pages/statement/already-removed.html b/server/views/pages/statement/already-removed.html index 5b833d23..f5cf969c 100644 --- a/server/views/pages/statement/already-removed.html +++ b/server/views/pages/statement/already-removed.html @@ -1,6 +1,6 @@ {% extends "../../partials/layout.html" %} -{% set pageTitle = 'Your request has been submitted' %} +{% set pageTitle = 'Your request has been submitted' %} {% block content %}
diff --git a/server/views/pages/statement/check-your-statement.html b/server/views/pages/statement/check-your-statement.html index dbbe9e93..dc22c5ce 100644 --- a/server/views/pages/statement/check-your-statement.html +++ b/server/views/pages/statement/check-your-statement.html @@ -8,7 +8,7 @@ {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} {% import "../statementDetailMacro.njk" as statementDetail %} -{% set pageTitle = 'Check your statement before submitting it' %} +{% set pageTitle = 'Check your statement before submitting it' %} {% block content %}
diff --git a/server/views/pages/statement/removal-already-requested.html b/server/views/pages/statement/removal-already-requested.html index ccbb1324..79888679 100644 --- a/server/views/pages/statement/removal-already-requested.html +++ b/server/views/pages/statement/removal-already-requested.html @@ -1,6 +1,6 @@ {% extends "../../partials/layout.html" %} -{% set pageTitle = 'You have already requested to be removed from this use of force incident' %} +{% set pageTitle = 'You have already requested to be removed from this use of force incident' %} {% block content %}
diff --git a/server/views/pages/statement/removal-requested.html b/server/views/pages/statement/removal-requested.html index 7774c6e2..fd4bdde4 100644 --- a/server/views/pages/statement/removal-requested.html +++ b/server/views/pages/statement/removal-requested.html @@ -1,7 +1,7 @@ {% extends "../../partials/layout.html" %} {% from "govuk/components/panel/macro.njk" import govukPanel %} -{% set pageTitle = 'Your request has been submitted' %} +{% set pageTitle = 'Your request has been submitted' %} {% block content %}
diff --git a/server/views/pages/statement/request-removal.html b/server/views/pages/statement/request-removal.html index 33e63e47..20b94b65 100644 --- a/server/views/pages/statement/request-removal.html +++ b/server/views/pages/statement/request-removal.html @@ -4,7 +4,7 @@ {% from "govuk/components/textarea/macro.njk" import govukTextarea %} {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} -{% set pageTitle = 'Request to be removed from a use of force incident' %} +{% set pageTitle = 'Request to be removed from a use of force incident' %} {% block content %}
diff --git a/server/views/pages/statement/statement-submitted.html b/server/views/pages/statement/statement-submitted.html index fd9812d0..f053e972 100644 --- a/server/views/pages/statement/statement-submitted.html +++ b/server/views/pages/statement/statement-submitted.html @@ -2,7 +2,7 @@ {% from "govuk/components/button/macro.njk" import govukButton %} {% from "govuk/components/panel/macro.njk" import govukPanel %} -{% set pageTitle = 'Your statement has been submitted' %} +{% set pageTitle = 'Your statement has been submitted' %} {% block content %} diff --git a/server/views/pages/statement/write-your-statement.html b/server/views/pages/statement/write-your-statement.html index 71f87b11..13b2630f 100644 --- a/server/views/pages/statement/write-your-statement.html +++ b/server/views/pages/statement/write-your-statement.html @@ -8,13 +8,13 @@ {% from "govuk/components/checkboxes/macro.njk"import govukCheckboxes %} {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} -{% set pageTitle = 'Your use of force statement' %} +{% set pageTitle = 'Your use of force statement' %} {% if errors | findError('lastTrainingYear') %} {% set lastTrainingYearClass = 'govuk-input--width-4' %} -{% set lastTrainingMonthClass = 'govuk-!-margin-right-3' %} +{% set lastTrainingMonthClass = 'govuk-!-margin-right-3' %} {% else %} -{% set lastTrainingYearClass = 'govuk-!-margin-left-5 govuk-input--width-4' %} +{% set lastTrainingYearClass = 'govuk-!-margin-left-5 govuk-input--width-4' %} {% endif %} {% block beforeContent %} diff --git a/server/views/pages/statement/your-statement.html b/server/views/pages/statement/your-statement.html index 6c9ea1bf..6944430f 100644 --- a/server/views/pages/statement/your-statement.html +++ b/server/views/pages/statement/your-statement.html @@ -8,7 +8,7 @@ {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} {% import "../statementDetailMacro.njk" as statementDetail %} -{% set pageTitle = 'Your use of force statement' %} +{% set pageTitle = 'Your use of force statement' %} {% block beforeContent %} {% include "../../partials/breadcrumbs.njk" %} diff --git a/server/views/pages/your-report.html b/server/views/pages/your-report.html index 09e1b48c..9714a12c 100644 --- a/server/views/pages/your-report.html +++ b/server/views/pages/your-report.html @@ -4,7 +4,7 @@ {% from "govuk/components/summary-list/macro.njk" import govukSummaryList %} {% import "./reportDetailMacro.njk" as reportDetail %} -{% set pageTitle = 'Use of force report' %} +{% set pageTitle = 'Use of force report' %} {% block beforeContent %} {% include "../partials/breadcrumbs.njk" %} diff --git a/server/views/partials/incidentPage.html b/server/views/partials/incidentPage.html index b858bb06..506bf3c8 100644 --- a/server/views/partials/incidentPage.html +++ b/server/views/partials/incidentPage.html @@ -2,7 +2,7 @@ {% from "govuk/components/notification-banner/macro.njk" import govukNotificationBanner %} {% from "../macros.njk" import exitLink %} -{% set pageTitle = 'Use of force incidents' %} +{% set pageTitle = 'Use of force incidents' %} {% block beforeContent %} {{ govukBreadcrumbs({ diff --git a/server/views/partials/layout.html b/server/views/partials/layout.html index 32a3a3b7..930c374b 100644 --- a/server/views/partials/layout.html +++ b/server/views/partials/layout.html @@ -1,7 +1,7 @@ {% extends "govuk/template.njk" %} {% from "govuk/components/breadcrumbs/macro.njk" import govukBreadcrumbs %} -{% set pageTitle = pageTitle | default('GOV.UK - Use of force') %} +{% set pageTitle = pageTitle | default('GOV.UK - Use of force') %} {% block pageTitle %} {{ pageTitle }}