From 297d1ad96f280217a279fffe3c8cf4473f31dab8 Mon Sep 17 00:00:00 2001 From: Joshua Hawxwell Date: Wed, 5 Feb 2025 09:41:04 +0000 Subject: [PATCH] Use 2 year signing deadline in submission content --- .../donor/you-cannot-sign-your-lpa-yet.cy.js | 16 ++-- cypress/e2e/voucher/confirm-your-name.cy.js | 10 ++- go.sum | 62 +-------------- .../donor/donordata/mock_Localizer_test.go | 79 +++++++++++++++++++ internal/donor/donordata/provided.go | 45 ++++++++--- internal/donor/donordata/provided_test.go | 69 ++++++++++++++-- lang/cy.json | 41 +++++----- lang/en.json | 31 +++++--- .../choose_your_certificate_provider.gohtml | 6 +- .../donor/how_to_sign_your_lpa.gohtml | 8 +- .../donor/you_have_submitted_your_lpa.gohtml | 26 ++++-- 11 files changed, 259 insertions(+), 134 deletions(-) create mode 100644 internal/donor/donordata/mock_Localizer_test.go diff --git a/cypress/e2e/donor/you-cannot-sign-your-lpa-yet.cy.js b/cypress/e2e/donor/you-cannot-sign-your-lpa-yet.cy.js index f5931317cc..9c4ca0c5dc 100644 --- a/cypress/e2e/donor/you-cannot-sign-your-lpa-yet.cy.js +++ b/cypress/e2e/donor/you-cannot-sign-your-lpa-yet.cy.js @@ -4,15 +4,15 @@ describe('You cannot sign your LPA yet', () => { cy.visit('/fixtures?redirect=/choose-attorneys-summary&progress=addCorrespondent'); cy.contains('.govuk-summary-card', 'Jessie Jones').contains('a', 'Change').click(); - cy.get('#f-date-of-birth-year').clear(); - cy.get('#f-date-of-birth-year').type(today.getFullYear() - 1); + cy.get('#f-date-of-birth-year').focus().clear(); + cy.get('#f-date-of-birth-year').focus().type(today.getFullYear() - 1); cy.contains('button', 'Save and continue').click() cy.contains('button', 'Save and continue').click() cy.visitLpa('/choose-replacement-attorneys-summary') cy.contains('.govuk-summary-card', 'Blake Buckley').contains('a', 'Change').click(); - cy.get('#f-date-of-birth-year').clear(); - cy.get('#f-date-of-birth-year').type(today.getFullYear() - 1); + cy.get('#f-date-of-birth-year').focus().clear(); + cy.get('#f-date-of-birth-year').focus().type(today.getFullYear() - 1); cy.contains('button', 'Save and continue').click() cy.contains('button', 'Save and continue').click() cy.contains('a', 'Return to task list').click() @@ -24,16 +24,16 @@ describe('You cannot sign your LPA yet', () => { cy.contains('.govuk-summary-list__row', 'Jessie Jones').contains('a', 'Change').click(); cy.url().should('contain', '/choose-attorneys') - cy.get('#f-date-of-birth-year').clear(); - cy.get('#f-date-of-birth-year').type("2000"); + cy.get('#f-date-of-birth-year').focus().clear(); + cy.get('#f-date-of-birth-year').focus().type("2000"); cy.contains('button', 'Save and continue').click() cy.url().should('contain', '/you-cannot-sign-your-lpa-yet') cy.contains('.govuk-summary-list__row', 'Blake Buckley').contains('a', 'Change').click(); cy.url().should('contain', '/choose-replacement-attorneys') - cy.get('#f-date-of-birth-year').clear(); - cy.get('#f-date-of-birth-year').type("2000"); + cy.get('#f-date-of-birth-year').focus().clear(); + cy.get('#f-date-of-birth-year').focus().type("2000"); cy.contains('button', 'Save and continue').click() cy.url().should('contain', '/task-list') }); diff --git a/cypress/e2e/voucher/confirm-your-name.cy.js b/cypress/e2e/voucher/confirm-your-name.cy.js index e47a8100f1..97ad463529 100644 --- a/cypress/e2e/voucher/confirm-your-name.cy.js +++ b/cypress/e2e/voucher/confirm-your-name.cy.js @@ -54,10 +54,12 @@ describe('Confirm your name', () => { cy.url().should('contain', '/your-name') cy.checkA11yApp(); - cy.get('#f-first-names').clear(); - cy.get('#f-first-names').type('Charlie'); - cy.get('#f-last-name').clear(); - cy.get('#f-last-name').type('Cooper'); + cy.get('#f-first-names').focus().clear(); + cy.get('#f-first-names').focus().type('Charlie'); + cy.get('#f-first-names').should('have.value', 'Charlie'); + cy.get('#f-last-name').focus().clear(); + cy.get('#f-last-name').focus().type('Cooper'); + cy.get('#f-last-name').should('have.value', 'Cooper'); cy.contains('button', 'Save and continue').click(); cy.contains('button', 'Continue').click(); diff --git a/go.sum b/go.sum index 11d40b2f04..158f987a82 100644 --- a/go.sum +++ b/go.sum @@ -4,114 +4,60 @@ github.com/MicahParks/keyfunc/v3 v3.3.10 h1:JtEGE8OcNeI297AMrR4gVXivV8fyAawFUMkb github.com/MicahParks/keyfunc/v3 v3.3.10/go.mod h1:1TEt+Q3FO7Yz2zWeYO//fMxZMOiar808NqjWQQpBPtU= github.com/aws/aws-lambda-go v1.47.0 h1:0H8s0vumYx/YKs4sE7YM0ktwL2eWse+kfopsRI1sXVI= github.com/aws/aws-lambda-go v1.47.0/go.mod h1:dpMpZgvWx5vuQJfBt0zqBha60q7Dd7RfgJv23DymV8A= -github.com/aws/aws-sdk-go-v2 v1.33.0 h1:Evgm4DI9imD81V0WwD+TN4DCwjUMdc94TrduMLbgZJs= -github.com/aws/aws-sdk-go-v2 v1.33.0/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= github.com/aws/aws-sdk-go-v2 v1.35.0 h1:jTPxEJyzjSuuz0wB+302hr8Eu9KUI+Zv8zlujMGJpVI= github.com/aws/aws-sdk-go-v2 v1.35.0/go.mod h1:JgstGg0JjWU1KpVJjD5H0y0yyAIpSdKEq556EI6yOOM= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 h1:lL7IfaFzngfx0ZwUGOZdsFFnQ5uLvR0hWqqhyE7Q9M8= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7/go.mod h1:QraP0UcVlQJsmHfioCrveWOC1nbiWUl3ej08h4mXWoc= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8 h1:zAxi9p3wsZMIaVCdoiQp2uZ9k1LsZvmAnoTBeZPXom0= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8/go.mod h1:3XkePX5dSaxveLAYY7nsbsZZrKxCyEuE5pM4ziFxyGg= -github.com/aws/aws-sdk-go-v2/config v1.29.1 h1:JZhGawAyZ/EuJeBtbQYnaoftczcb2drR2Iq36Wgz4sQ= -github.com/aws/aws-sdk-go-v2/config v1.29.1/go.mod h1:7bR2YD5euaxBhzt2y/oDkt3uNRb6tjFp98GlTFueRwk= github.com/aws/aws-sdk-go-v2/config v1.29.3 h1:a5Ucjxe6iV+LHEBmYA9w40rT5aGxWybx/4l/O/fvJlE= github.com/aws/aws-sdk-go-v2/config v1.29.3/go.mod h1:pt9z1x12zDiDb4iFLrxoeAKLVCU/Gp9DL/5BnwlY77o= -github.com/aws/aws-sdk-go-v2/credentials v1.17.54 h1:4UmqeOqJPvdvASZWrKlhzpRahAulBfyTJQUaYy4+hEI= -github.com/aws/aws-sdk-go-v2/credentials v1.17.54/go.mod h1:RTdfo0P0hbbTxIhmQrOsC/PquBZGabEPnCaxxKRPSnI= github.com/aws/aws-sdk-go-v2/credentials v1.17.56 h1:JKMBreKudV+ozx6rZJLvEtiexv48aEdhdC7mXUw9MLs= github.com/aws/aws-sdk-go-v2/credentials v1.17.56/go.mod h1:S3xRjIHD8HHFgMTz4L56q/7IldfNtGL9JjH/vP3U6DA= -github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.15.28 h1:Q5xJGlNgUJ7nnL4klwoaEimWJo3N6B6S8y/fMGG165I= -github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.15.28/go.mod h1:wIjOAtUwNtKiZXq7wD1aZvrjcr2AJwE7pmUUWXyz5Es= github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.17.0 h1:OljitD0YIY2qkKpHChC+CMjKywEsqDLhUlHOI2AseXQ= github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.17.0/go.mod h1:bcffXfieyW3VfH02hxx6MBuCU9UOBRguc4iS7mV7V9E= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24 h1:5grmdTdMsovn9kPZPI23Hhvp0ZyNm5cRO+IZFIYiAfw= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24/go.mod h1:zqi7TVKTswH3Ozq28PkmBmgzG1tona7mo9G2IJg4Cis= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.26 h1:XMBqBEuZLf8yxtH+mU/uUDyQbN4iD/xv9h6he2+lzhw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.26/go.mod h1:d0+wQ/3CYGPuHEfBTPpQdfUX7gjk0/Lxs5Q6KzdEGY8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28 h1:igORFSiH3bfq4lxKFkTSYDhJEUCYo6C8VKiWJjYwQuQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28/go.mod h1:3So8EA/aAYm36L7XIvCVwLa0s5N0P7o2b1oqnx/2R4g= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.30 h1:+7AzSGNhHoY53di13lvztf9Dyd/9ofzoYGBllkWp3a0= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.30/go.mod h1:Jxd/FrCny99yURiQiMywgXvBhd7tmgdv6KdlUTNzMSo= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28 h1:1mOW9zAUMhTSrMDssEHS/ajx8JcAj/IcftzcmNlmVLI= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28/go.mod h1:kGlXVIWDfvt2Ox5zEaNglmq0hXPHgQFNMix33Tw22jA= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.30 h1:Ex06eY6I5rO7IX0HalGfa5nGjpBoOsS1Qm3xfjkuszs= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.30/go.mod h1:AvyEMA9QcX59kFhVizBpIBpEMThUTXssuJe+emBdcGM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 h1:Pg9URiobXy85kgFev3og2CuOZ8JZUBENF+dcgWBaYNk= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.28 h1:7kpeALOUeThs2kEjlAxlADAVfxKmkYAedlpZ3kdoSJ4= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.28/go.mod h1:pyaOYEdp1MJWgtXLy6q80r3DhsVdOIOZNB9hdTcJIvI= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.30 h1:yQSv0NQ4CRHoki6AcV/Ldoa4/QCMJauZkF23qznBCPQ= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.30/go.mod h1:jH3z32wDrsducaYX26xnl41ksYFWqjHphIciwIANZkc= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.43.9 h1:bfHEPSWRqKAUp9ugaYDo6bYmCwYGhpGlcSYbnjpZ4lQ= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.43.9/go.mod h1:w0Sa1DOIjqTBXmwYFk1r+i6Xtkeq21JGjUGe/NCqBHs= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.43.11 h1:vvWcWIFeJVOAXXSc3Cibn0nPVywcL4qInEJSKzr5VyU= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.43.11/go.mod h1:IQL1+EizAZsMqhfXSqyj8WBoKZrKBOghwmL6wd6vVco= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.39.5 h1:RLbuYls/4gmY3AIHVyCLZgRjclRlSbUEUXLeva6C81Y= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.39.5/go.mod h1:2xlKGs8OTgN92fRVfP4EgFgQGhYwVI7LQ2PLQ0tIFAQ= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.39.7 h1:JFLdDS6ZGKoZii7O+9IBsuvCnvW2vSbseNBji8OKEo8= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.39.7/go.mod h1:8blEsG2cwaS8BK1YiWSEWFwmVav7i7EJk5swid5Vhcw= -github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.24.15 h1:c6fGxhbI9ffZquEkJQATpam3vchGuEEQXgWwxQAy3o4= -github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.24.15/go.mod h1:SnMeleniez26QKaqTeco4TSxBU3WzRpGu6HELM6OyQ8= github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.24.17 h1:jPqYzzklr/WkOk5imqvgpm4MkGLoXs6daKsoQSQiSrg= github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.24.17/go.mod h1:DRtG2Ux6Ba26Q+bt/ef7gHa10ilrfqobnAAnmBIPnuk= -github.com/aws/aws-sdk-go-v2/service/eventbridge v1.36.6 h1:oezyICM/OhoSbv4QebkZgzKSA5xSZOrvf/dqH140TT4= -github.com/aws/aws-sdk-go-v2/service/eventbridge v1.36.6/go.mod h1:oYLt+qRhI/0TG5+dKGRD91tcY4eE/C1V4r8q4OoChTc= github.com/aws/aws-sdk-go-v2/service/eventbridge v1.36.8 h1:RWjHFMWOe3NqKlnLTCpz3kGVcbufEt9fITtV4IZj1P0= github.com/aws/aws-sdk-go-v2/service/eventbridge v1.36.8/go.mod h1:6a2uJNSjf0jX/AxEOodBfep8i9sNdhHyqKTRrhfAZUA= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 h1:D4oz8/CzT9bAEYtVhSBmFj2dNOtaHOtMKc2vHBwYizA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2/go.mod h1:Za3IHqTQ+yNcRHxu1OFucBh0ACZT4j4VQFF0BqpZcLY= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.2 h1:e6um6+DWYQP1XCa+E9YVtG/9v1qk5lyAOelMOVwSyO8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.2/go.mod h1:dIW8puxSbYLSPv/ju0d9A3CpwXdtqvJtYKDMVmPLOWE= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.4 h1:iwk7v5+lUtA0cIQcQM6EyCXtQJZ9MGIWWaf0JKud5UE= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.4/go.mod h1:o9mSr0x1NwImSmP9q38aTUhjYwcDm277YUURBjXcC2I= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.9 h1:ramlTFqWSsOt4Y/skpd30D8oI0kfKf5wd1Yu9C5HhPw= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.9/go.mod h1:+B//vxKaB6Z/HfJfRV4ikLz0M7nIcKheHKm96FuaRrs= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.11 h1:f36sb0FYLZui8mzV6o8DxkUyvOdZfkemyCPTGDJdWhE= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.11/go.mod h1:MaBbVwqDmlH9ytOOcERyVQ+Z6nvWkEdRy0k44m3MYkE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9 h1:TQmKDyETFGiXVhZfQ/I0cCFziqqX58pi4tKJGYGFSz0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9/go.mod h1:HVLPK2iHQBUx7HfZeOQSEu3v2ubZaAY2YPbAm5/WUyY= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.11 h1:5JKQ2J3BBW4ovy6A/5Lwx9SpA6IzgH8jB3bquGZ1NUw= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.11/go.mod h1:VShCk7rfCzK/b9U1aSkzLwcOoaDlYna16482QqEavis= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.9 h1:2aInXbh02XsbO0KobPGMNXyv2QP73VDKsWPNJARj/+4= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.9/go.mod h1:dgXS1i+HgWnYkPXqNoPIPKeUsUUYHaUbThC90aDnNiE= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.11 h1:P8qJcYGVDswlMkVFhMi7SJmlf0jNA0JRbvE/q2PuXD8= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.11/go.mod h1:9yp5x5vYwyhnZZ9cKLBxZmrJTGv99C9iVmG7AKeUvdc= -github.com/aws/aws-sdk-go-v2/service/s3 v1.74.0 h1:ncCHiFU9Eq4qnKCNlzMZXfFmvb9R8OVNfU8SFOskxdI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.74.0/go.mod h1:jGJ/v7FIi7Ys9t54tmEFnrxuaWeJLpwNgKp2DXAVhOU= github.com/aws/aws-sdk-go-v2/service/s3 v1.75.1 h1:hbTWOPUgAnPpk5+G1jZjYnq4eKCAePwRJEqLN1Tj7Bg= github.com/aws/aws-sdk-go-v2/service/s3 v1.75.1/go.mod h1:Mo2xdnRzOyZQkGHEbhOgooG0eIV+GqS/g8LU4B5iftI= -github.com/aws/aws-sdk-go-v2/service/s3control v1.52.6 h1:dutCsHS5Ie7IhE1EL3j0frQSt+e+RhA0HlOfOS+Bvcs= -github.com/aws/aws-sdk-go-v2/service/s3control v1.52.6/go.mod h1:EdZWFev1FHTtoNq2ZtXCPfwLuqje1Sy63CuQOF3eSDY= github.com/aws/aws-sdk-go-v2/service/s3control v1.53.1 h1:K6lDfAeqpZha5W7b62f12jMH7N4iQLm5SWUEskqQOyk= github.com/aws/aws-sdk-go-v2/service/s3control v1.53.1/go.mod h1:M5l2ylHcmekMtWszs3F8XQvTqejNaYnPnWe3rmkA+xc= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.13 h1:+dFX6kb0ekos09TP4icFIyqq/u3POCQDSrShc9ZkCCI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.13/go.mod h1:l+Fboycn+g9RMQcYbTfpqF/d3qZn90q5PYmO7Biu+WM= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.15 h1:bd4Y+qjbtrnfVvlyq9NujUgMUOup6dRl2lW7YCuX528= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.15/go.mod h1:4HSmgD6HBsolzIX2+0z3SLwI/Qmft3Q1F94m9Xm9388= github.com/aws/aws-sdk-go-v2/service/sns v1.33.12 h1:5LZIyHvSAu2DeC9X6P9c3ALFTSDu/oyJ5Cq0rLbe2mk= github.com/aws/aws-sdk-go-v2/service/sns v1.33.12/go.mod h1:W7OKlS05LPMcLvQamv12gv/hSQlWAyU1lh98jwMVf2k= -github.com/aws/aws-sdk-go-v2/service/sqs v1.37.9 h1:nmIycwVQExOZaUG/G/gUdN1o/x5D1Gtd4cxl+DrbJes= -github.com/aws/aws-sdk-go-v2/service/sqs v1.37.9/go.mod h1:VS6v7DyZL6dnc6Lz850vFzW+Nhzpcgj+P1ftJEBngyE= github.com/aws/aws-sdk-go-v2/service/sqs v1.37.11 h1:2FRo0wZRNAq4VhTq7hlAgNzy2Mj9EbJccSGOnRm1SKU= github.com/aws/aws-sdk-go-v2/service/sqs v1.37.11/go.mod h1:k3iAJc6PY6qdwqlc/veSVFc2Pvvmz2POBAtQenXk/vg= -github.com/aws/aws-sdk-go-v2/service/ssm v1.56.7 h1:vv7lah/6QrqHry4gcYPCcy7ByAmBAtGNjPfTf4HTH/s= -github.com/aws/aws-sdk-go-v2/service/ssm v1.56.7/go.mod h1:8HjMkoX1B6HEsxGMPLu6hnx3135hwxpi6eI9aErNTAg= github.com/aws/aws-sdk-go-v2/service/ssm v1.56.9 h1:3vcuTs/UbwZXijnNA3MLEJ7nOj7sgJ9DMrRAffyAx2A= github.com/aws/aws-sdk-go-v2/service/ssm v1.56.9/go.mod h1:XRfsZF9CPS7p8MBhoAogDHwacMX3zm7+4JEteDrbbnc= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.11 h1:kuIyu4fTT38Kj7YCC7ouNbVZSSpqkZ+LzIfhCr6Dg+I= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.11/go.mod h1:Ro744S4fKiCCuZECXgOi760TiYylUM8ZBf6OGiZzJtY= github.com/aws/aws-sdk-go-v2/service/sso v1.24.13 h1:q4pOAKxypbFoUJzOpgo939bF50qb4DgYshiDfcsdN0M= github.com/aws/aws-sdk-go-v2/service/sso v1.24.13/go.mod h1:G/0PTg7+vQT42ictQGjJhixzTcVZtHFvrN/OeTXrRfQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.10 h1:l+dgv/64iVlQ3WsBbnn+JSbkj01jIi+SM0wYsj3y/hY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.10/go.mod h1:Fzsj6lZEb8AkTE5S68OhcbBqeWPsR8RnGuKPr8Todl8= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.12 h1:4sGSGshSSfO1vrcXruPick3ioSf8nhhD6nuB2ni37P4= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.12/go.mod h1:NHpu/pLOelViA4qxkAFH10VLqh+XeLhZfXDaFyMVgSs= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.9 h1:BRVDbewN6VZcwr+FBOszDKvYeXY1kJ+GGMCcpghlw0U= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.9/go.mod h1:f6vjfZER1M17Fokn0IzssOTMT2N8ZSq+7jnNF0tArvw= github.com/aws/aws-sdk-go-v2/service/sts v1.33.11 h1:RIXOjp7Dp4siCYJRwBHUcBdVgOWflSJGlq4ZhMI5Ta0= github.com/aws/aws-sdk-go-v2/service/sts v1.33.11/go.mod h1:ZR17k9bPKPR8u0IkyA6xVsjr56doNQ4ZB1fs7abYBfE= github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= @@ -191,8 +137,6 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/ministryofjustice/opg-go-common v1.67.0 h1:EOuKcupnXX8vXdZaY/UEzqvXaBX0hbDMlEKMm8akERQ= -github.com/ministryofjustice/opg-go-common v1.67.0/go.mod h1:ChMNWq0LXn5CexlllRmuMxiWlCcIB0+msrPNJ8mXktQ= github.com/ministryofjustice/opg-go-common v1.68.0 h1:kMInK2Nanm4sdG9Zwi8IcK8HLlhHScKt9YWpHr0ZUkw= github.com/ministryofjustice/opg-go-common v1.68.0/go.mod h1:bv26jCs0dMeEHIrDCxOiVayHjv3BGyPgEEQTjbWgEV0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -290,8 +234,8 @@ go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= @@ -326,8 +270,6 @@ google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f h1: google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:Ic02D47M+zbarjYYUlK57y316f2MoN0gjAwI3f2S95o= google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= -google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= -google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= diff --git a/internal/donor/donordata/mock_Localizer_test.go b/internal/donor/donordata/mock_Localizer_test.go new file mode 100644 index 0000000000..856952b96a --- /dev/null +++ b/internal/donor/donordata/mock_Localizer_test.go @@ -0,0 +1,79 @@ +// Code generated by mockery. DO NOT EDIT. + +package donordata + +import mock "github.com/stretchr/testify/mock" + +// mockLocalizer is an autogenerated mock type for the Localizer type +type mockLocalizer struct { + mock.Mock +} + +type mockLocalizer_Expecter struct { + mock *mock.Mock +} + +func (_m *mockLocalizer) EXPECT() *mockLocalizer_Expecter { + return &mockLocalizer_Expecter{mock: &_m.Mock} +} + +// Format provides a mock function with given fields: _a0, _a1 +func (_m *mockLocalizer) Format(_a0 string, _a1 map[string]any) string { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for Format") + } + + var r0 string + if rf, ok := ret.Get(0).(func(string, map[string]any) string); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// mockLocalizer_Format_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Format' +type mockLocalizer_Format_Call struct { + *mock.Call +} + +// Format is a helper method to define mock.On call +// - _a0 string +// - _a1 map[string]any +func (_e *mockLocalizer_Expecter) Format(_a0 interface{}, _a1 interface{}) *mockLocalizer_Format_Call { + return &mockLocalizer_Format_Call{Call: _e.mock.On("Format", _a0, _a1)} +} + +func (_c *mockLocalizer_Format_Call) Run(run func(_a0 string, _a1 map[string]any)) *mockLocalizer_Format_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(map[string]any)) + }) + return _c +} + +func (_c *mockLocalizer_Format_Call) Return(_a0 string) *mockLocalizer_Format_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockLocalizer_Format_Call) RunAndReturn(run func(string, map[string]any) string) *mockLocalizer_Format_Call { + _c.Call.Return(run) + return _c +} + +// newMockLocalizer creates a new instance of mockLocalizer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockLocalizer(t interface { + mock.TestingT + Cleanup(func()) +}) *mockLocalizer { + mock := &mockLocalizer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/donor/donordata/provided.go b/internal/donor/donordata/provided.go index 4edee36dd9..a231f63355 100644 --- a/internal/donor/donordata/provided.go +++ b/internal/donor/donordata/provided.go @@ -21,6 +21,10 @@ import ( "github.com/mitchellh/hashstructure/v2" ) +type Localizer interface { + Format(string, map[string]any) string +} + const ( currentHashVersion uint8 = 0 currentCheckedHashVersion uint8 = 0 @@ -340,6 +344,25 @@ func (p *Provided) DonorIdentityConfirmed() bool { p.IdentityUserData.DateOfBirth.Equals(p.Donor.DateOfBirth) } +// SignatoriesNames returns the full names of the non-donor actors expected to +// sign the LPA. +func (p *Provided) SignatoriesNames(localizer Localizer) []string { + return append([]string{p.CertificateProvider.FullName()}, p.AttorneysNames(localizer)...) +} + +// AttorneysNames returns the full names of the attorneys and trust corporation. +func (p *Provided) AttorneysNames(localizer Localizer) []string { + var names []string + + if p.HasTrustCorporation() { + names = append(names, localizer.Format("aSignatoryFromTrustCorporation", map[string]any{ + "TrustCorporationName": p.TrustCorporation().Name, + })) + } + + return append(names, p.AllLayAttorneysFullNames()...) +} + // SigningDeadline gives the date at which the LPA should be signed by the // certificate provider and attorneys. func (p *Provided) SigningDeadline() time.Time { @@ -347,7 +370,7 @@ func (p *Provided) SigningDeadline() time.Time { return p.SignedAt.AddDate(0, 4, 14) } - return p.SignedAt.AddDate(0, 0, 28) + return p.SignedAt.AddDate(2, 0, 0) } // IdentityDeadline gives the date which the donor must complete their identity @@ -367,6 +390,12 @@ func (p *Provided) CourtOfProtectionSubmissionDeadline() time.Time { return p.SignedAt.AddDate(0, 6, 0) } +// CertificateProviderDeadline gives the date at which the certificate provider +// should act. +func (p *Provided) CertificateProviderDeadline() time.Time { + return p.SignedAt.AddDate(0, 6, 0) +} + type Under18ActorDetails struct { FullName string DateOfBirth date.Date @@ -465,18 +494,16 @@ func (p *Provided) AllLayAttorneysFullNames() []string { return names } -func (p *Provided) TrustCorporationsNames() []string { - var names []string +func (p *Provided) HasTrustCorporation() bool { + return p.Attorneys.TrustCorporation.Name != "" || p.ReplacementAttorneys.TrustCorporation.Name != "" +} +func (p *Provided) TrustCorporation() TrustCorporation { if p.Attorneys.TrustCorporation.Name != "" { - names = append(names, p.Attorneys.TrustCorporation.Name) - } - - if p.ReplacementAttorneys.TrustCorporation.Name != "" { - names = append(names, p.ReplacementAttorneys.TrustCorporation.Name) + return p.Attorneys.TrustCorporation } - return names + return p.ReplacementAttorneys.TrustCorporation } func (p *Provided) Cost() int { diff --git a/internal/donor/donordata/provided_test.go b/internal/donor/donordata/provided_test.go index 77089a8ace..af540bf350 100644 --- a/internal/donor/donordata/provided_test.go +++ b/internal/donor/donordata/provided_test.go @@ -447,12 +447,48 @@ func TestIdentityConfirmed(t *testing.T) { } } +func TestSignatoriesNames(t *testing.T) { + provided := &Provided{ + CertificateProvider: CertificateProvider{FirstNames: "A", LastName: "B"}, + Attorneys: Attorneys{ + Attorneys: []Attorney{{FirstNames: "C", LastName: "D"}}, + }, + ReplacementAttorneys: Attorneys{ + Attorneys: []Attorney{{FirstNames: "E", LastName: "F"}}, + }, + PeopleToNotify: PeopleToNotify{{FirstNames: "X", LastName: "Y"}}, + } + + assert.Equal(t, []string{"A B", "C D", "E F"}, provided.SignatoriesNames(nil)) +} + +func TestSignatoriesNamesWhenTrustCorporation(t *testing.T) { + provided := &Provided{ + CertificateProvider: CertificateProvider{FirstNames: "A", LastName: "B"}, + Attorneys: Attorneys{ + Attorneys: []Attorney{{FirstNames: "C", LastName: "D"}}, + }, + ReplacementAttorneys: Attorneys{ + TrustCorporation: TrustCorporation{Name: "Trusted"}, + Attorneys: []Attorney{{FirstNames: "E", LastName: "F"}}, + }, + PeopleToNotify: PeopleToNotify{{FirstNames: "X", LastName: "Y"}}, + } + + localizer := newMockLocalizer(t) + localizer.EXPECT(). + Format("aSignatoryFromTrustCorporation", map[string]any{"TrustCorporationName": "Trusted"}). + Return("signatory") + + assert.Equal(t, []string{"A B", "signatory", "C D", "E F"}, provided.SignatoriesNames(localizer)) +} + func TestSigningDeadline(t *testing.T) { donor := Provided{ SignedAt: time.Date(2020, time.January, 2, 3, 4, 5, 6, time.UTC), } - expected := time.Date(2020, time.January, 30, 3, 4, 5, 6, time.UTC) + expected := time.Date(2022, time.January, 2, 3, 4, 5, 6, time.UTC) assert.Equal(t, expected, donor.SigningDeadline()) donor.RegisteringWithCourtOfProtection = true @@ -469,6 +505,15 @@ func TestCourtOfProtectionSubmissionDeadline(t *testing.T) { assert.Equal(t, expected, donor.CourtOfProtectionSubmissionDeadline()) } +func TestCertificateProviderDeadline(t *testing.T) { + donor := Provided{ + SignedAt: time.Date(2020, time.January, 2, 3, 4, 5, 6, time.UTC), + } + + expected := time.Date(2020, time.July, 2, 3, 4, 5, 6, time.UTC) + assert.Equal(t, expected, donor.CertificateProviderDeadline()) +} + func TestUnder18ActorDetails(t *testing.T) { under18 := date.Today().AddDate(0, 0, -1) over18 := date.Today().AddDate(-18, 0, -1) @@ -595,13 +640,23 @@ func TestAllLayAttorneysFullNames(t *testing.T) { assert.Equal(t, []string{"John Smith", "Barry Smith", "John2 Smithe", "Barry2 Smithe"}, donor.AllLayAttorneysFullNames()) } -func TestTrustCorporationOriginal(t *testing.T) { - donor := &Provided{ - Attorneys: Attorneys{TrustCorporation: TrustCorporation{Name: "Corp"}}, - ReplacementAttorneys: Attorneys{TrustCorporation: TrustCorporation{Name: "Trust"}}, - } +func TestHasTrustCorporation(t *testing.T) { + none := &Provided{} + original := &Provided{Attorneys: Attorneys{TrustCorporation: TrustCorporation{Name: "Corp"}}} + replacement := &Provided{ReplacementAttorneys: Attorneys{TrustCorporation: TrustCorporation{Name: "Trust"}}} + + assert.False(t, none.HasTrustCorporation()) + assert.True(t, original.HasTrustCorporation()) + assert.True(t, replacement.HasTrustCorporation()) +} + +func TestTrustCorporation(t *testing.T) { + corporation := TrustCorporation{Name: "Corp"} + original := &Provided{Attorneys: Attorneys{TrustCorporation: corporation}} + replacement := &Provided{ReplacementAttorneys: Attorneys{TrustCorporation: corporation}} - assert.Equal(t, []string{"Corp", "Trust"}, donor.TrustCorporationsNames()) + assert.Equal(t, corporation, original.TrustCorporation()) + assert.Equal(t, corporation, replacement.TrustCorporation()) } func TestProvidedCost(t *testing.T) { diff --git a/lang/cy.json b/lang/cy.json index 5428ff0e24..27113c3479 100644 --- a/lang/cy.json +++ b/lang/cy.json @@ -200,8 +200,8 @@ "examplesOfProfessionalCertificateProvidersContent": "

Gallai’r bobl â’r sgiliau proffesiynol perthnasol gynnwys:

", "chooseSomeoneYoureComfortableHavingAConversationWith": "Dewiswch rywun rydych chi’n gyfforddus yn cael sgwrs agored, onest â nhw ac a fydd yn codi llais os ydyn nhw’n meddwl bod rhywbeth o’i le.", "whoCannotBeACertificateProviderAttorneys": "

Pwy na all fod yn ddarparwr tystysgrif

Ni all eich darparwr tystysgrif fod yn:

", - "whoCannotBeACertificateProviderTrustCorporation": "

Pwy sy’n methu bod yn ddarparwr tystysgrif

Ni all eich darparwr tystysgrif fod yn:

", - "whoCannotBeACertificateProviderAttorneysAndTrustCorporation": "

Pwy sy’n methu bod yn ddarparwr tystysgrif

Ni all eich darparwr tystysgrif fod yn:

", + "whoCannotBeACertificateProviderTrustCorporation": "

Pwy sy’n methu bod yn ddarparwr tystysgrif

Ni all eich darparwr tystysgrif fod yn:

", + "whoCannotBeACertificateProviderAttorneysAndTrustCorporation": "

Pwy sy’n methu bod yn ddarparwr tystysgrif

Ni all eich darparwr tystysgrif fod yn:

", "detailsYoullNeedAboutYourCertificateProvider": "

Manylion y bydd angen i chi eu cael gan eich darparwr tystysgrif

Bydd angen i chi ddweud wrthym beth yw eu:

Ar ôl i chi lofnodi eich LPA, bydd angen i’ch darparwr tystysgrif gadarnhau eu hunaniaeth.

Darllenwch fwy am ddarparwyr tystysgrif.

", "certificateProviderDetails": "Manylion eich darparwr tystysgrif", "certificateProviderDetailsHint": "Bydd hunaniaeth eich darparwr tystysgrif yn cael ei wirio. Dylech nodi eu henw fel y mae’n ymddangos ar ddogfennau swyddogol, fel eu pasbort neu drwydded yrru.", @@ -325,14 +325,7 @@ "ifYourLpaIsSuccessfullyReviewed": "Os bydd eich LPA yn cael ei hadolygu’n llwyddiannus gan y Llys Gwarchod, byddwn yn gallu ei chofrestru, a gellir ei defnyddio wedyn.", "ifTheCOPFindsYourLpaIsValid": "Os bydd y Llys Gwarchod yn pennu bod eich LPA yn ddilys, bydd yn cyfarwyddo Swyddfa’r Gwarcheidwad Cyhoeddus i’w chofrestru. Yna gellir defnyddio’ch LPA.", "weWillEmailYou": "

Byddwn yn anfon e-bost atoch i roi’r wybodaeth ddiweddaraf i chi am gofrestriad eich LPA. Os oes unrhyw broblemau, byddwn yn rhoi gwybod i chi.

Gallwch hefyd gadw golwg ar gynnydd eich LPA drwy fewngofnodi i’r gwasanaeth hwn unrhyw bryd.

", - "signIn4WeeksWarning": { - "zero": "", - "one": "Rhaid i {{.CertificateProviderFirstNames}} a’ch atwrnai lofnodi’r LPA erbyn {{.SigningDeadline}}. Os na fyddant yn llofnodi erbyn y dyddiad hwn, bydd yn rhaid i chi gwrdd â {{.CertificateProviderFirstNames}} a llofnodi’ch LPA eto.", - "two": "Rhaid i {{.CertificateProviderFirstNames}} a’ch atwrneiod lofnodi’r LPA erbyn {{.SigningDeadline}}. Os na fyddant yn llofnodi erbyn y dyddiad hwn, bydd yn rhaid i chi gwrdd â {{.CertificateProviderFirstNames}} a llofnodi’ch LPA eto.", - "few": "Rhaid i {{.CertificateProviderFirstNames}} a’ch atwrneiod lofnodi’r LPA erbyn {{.SigningDeadline}}. Os na fyddant yn llofnodi erbyn y dyddiad hwn, bydd yn rhaid i chi gwrdd â {{.CertificateProviderFirstNames}} a llofnodi’ch LPA eto.", - "many": "Rhaid i {{.CertificateProviderFirstNames}} a’ch atwrneiod lofnodi’r LPA erbyn {{.SigningDeadline}}. Os na fyddant yn llofnodi erbyn y dyddiad hwn, bydd yn rhaid i chi gwrdd â {{.CertificateProviderFirstNames}} a llofnodi’ch LPA eto.", - "other": "Rhaid i {{.CertificateProviderFirstNames}} a’ch atwrneiod lofnodi’r LPA erbyn {{.SigningDeadline}}. Os na fyddant yn llofnodi erbyn y dyddiad hwn, bydd yn rhaid i chi gwrdd â {{.CertificateProviderFirstNames}} a llofnodi’ch LPA eto." - }, + "signByDeadlineWarning": "Welsh {{.SignatoriesNames}} {{.SigningDeadline}}", "copSignDeadlineWarning": { "zero": "Rhaid i {{.CertificateProviderFirstNames}} a’ch atwrnai lofnodi’ch LPA erbyn {{.SigningDeadline}}. Ar ôl hynny, mae gennych tan {{.SubmissionDeadline}} i gyflwyno’r LPA i’r Llys Gwarchod. Os byddwch yn methu’r dyddiad hwn, bydd yn rhaid i chi lenwi LPA newydd a thalu ffi gofrestru arall.", "one": "Rhaid i {{.CertificateProviderFirstNames}} a’ch atwrnai lofnodi’ch LPA erbyn {{.SigningDeadline}}. Ar ôl hynny, mae gennych tan {{.SubmissionDeadline}} i gyflwyno’r LPA i’r Llys Gwarchod. Os byddwch yn methu’r dyddiad hwn, bydd yn rhaid i chi lenwi LPA newydd a thalu ffi gofrestru arall.", @@ -471,14 +464,14 @@ "many": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai eich atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol.", "other": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai eich atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol." }, - "meetFaceToFaceWithoutTrustCorporation": "Trefnwch amser i gwrdd wyneb yn wyneb ac mewn lle preifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr na chyflogeion {{.TrustCorporationsNames}} fod yn bresennol.", + "meetFaceToFaceWithoutTrustCorporation": "Trefnwch amser i gwrdd wyneb yn wyneb ac mewn lle preifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr na chyflogeion {{.TrustCorporationName}} fod yn bresennol.", "meetFaceToFaceWithoutAttorneysAndTrustCorporation": { - "zero": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationsNames}} a’ch atwrnai, {{.AttorneysFullNames}}, fod yn bresennol.", - "one": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationsNames}} a’ch atwrnai, {{.AttorneysFullNames}}, fod yn bresennol.", - "two": "’Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationsNames}} a’ch atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol.", - "few": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationsNames}} a’ch atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol.", - "many": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationsNames}} a’ch atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol.", - "other": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gydach darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationsNames}} a’ch atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol." + "zero": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationName}} a’ch atwrnai, {{.AttorneysFullNames}}, fod yn bresennol.", + "one": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationName}} a’ch atwrnai, {{.AttorneysFullNames}}, fod yn bresennol.", + "two": "’Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationName}} a’ch atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol.", + "few": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationName}} a’ch atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol.", + "many": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gyda’’ch darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationName}} a’ch atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol.", + "other": "Dod o hyd i amser i gwrdd wyneb yn wyneb ac yn breifat gydach darparwr tystysgrif {{.CertificateProviderFullName}}. Ni ddylai cyfarwyddwyr neu weithwyr {{.TrustCorporationName}} a’ch atwrneiod, {{.AttorneysFullNames}}, fod yn bresennol." }, "discussWithCertificateProviderContent": "

Darllenwch drwy eich LPA i wneud yn siŵr ei bod yn gywir – gallwch wneud newidiadau os oes angen.

Trafodwch eich LPA gyda {{.CertificateProviderFullName}}. Y person hwn sy’n gyfrifol am wneud yn siŵr:

", "signYourLpaStep": "

2. Llofnodi eich LPA

Pan fyddwch chi wedi llofnodi eich LPA (gallwch wneud hyn ar-lein) byddwn ni’n anfon cod unigryw at {{.CertificateProviderFullName}} drwy neges destun.

Bydd rhaid i {{.CertificateProviderFullName}} roi’r cod i’r gwasanaeth o fewn 30 munud i brofi eu bod wedi bod yn dyst i’ch llofnod.

", @@ -1564,5 +1557,17 @@ "changingYourLpaTypeContent": "

Welsh {{.TypeLpa}}.

", "yourPropertyAndAffairsLpaTypeCannotBeChanged": "Welsh", "yourPersonalWelfareLpaTypeCannotBeChanged": "Welsh", - "newEvidenceRequired:Exemption": "Welsh" + "newEvidenceRequired:Exemption": "Welsh", + "nowYouHaveSubmittedMustBeSignedWithinTwoYears": "Welsh", + "opgWillContactCertificateProviderWithin": "Welsh {{.CertificateProviderFullName}} {{.DeadlineDate}}", + "opgWillThenContactAttorneys": { + "zero": "Welsh {{.Names}}", + "one": "Welsh {{.Names}}", + "two": "Welsh {{.Names}}", + "few": "Welsh {{.Names}}", + "many": "Welsh {{.Names}}", + "other": "Welsh {{.Names}}" + }, + "confirmYourIdentityByReturning": "Welsh", + "aSignatoryFromTrustCorporation": "Welsh {{.TrustCorporationName}}" } diff --git a/lang/en.json b/lang/en.json index 98e3548768..39ccfa2ea2 100644 --- a/lang/en.json +++ b/lang/en.json @@ -186,8 +186,8 @@ "examplesOfProfessionalCertificateProvidersContent": "

People with the relevant professional skills could include:

", "chooseSomeoneYoureComfortableHavingAConversationWith": "Choose someone you’re comfortable having an open, honest conversation with and who will speak up if they think something is wrong.", "whoCannotBeACertificateProviderAttorneys": "

Who cannot be a certificate provider

Your certificate provider cannot be:

", - "whoCannotBeACertificateProviderTrustCorporation": "

Who cannot be a certificate provider

Your certificate provider cannot be:

", - "whoCannotBeACertificateProviderAttorneysAndTrustCorporation": "

Who cannot be a certificate provider

Your certificate provider cannot be:

", + "whoCannotBeACertificateProviderTrustCorporation": "

Who cannot be a certificate provider

Your certificate provider cannot be:

", + "whoCannotBeACertificateProviderAttorneysAndTrustCorporation": "

Who cannot be a certificate provider

Your certificate provider cannot be:

", "detailsYoullNeedAboutYourCertificateProvider": "

Details you’ll need from your certificate provider

You’ll need to tell us their:

Once you’ve signed your LPA, your certificate provider will need to confirm their identity.

Find out more about certificate providers.

", "certificateProviderDetails": "Your certificate provider’s details", "certificateProviderDetailsHint": "Your certificate provider’s identity will be checked. You should enter their name as it appears on official documents, such as their passport or driving licence.", @@ -314,18 +314,15 @@ "one": "OPG will contact {{.FullNames}} and ask them to sign your LPA as your attorney.", "other": "OPG will contact {{.FullNames}} and ask them to sign your LPA as your attorneys." }, - "onceEveryoneHasSigned": "Once everyone has signed and we’ve received your LPA, we’ll inform any people you chose to notify. A 4-week waiting period will begin. This is required by law, to allow anyone with objections to raise them.", + "onceEveryoneHasSigned": "Once everyone has signed and we’ve received your completed LPA, we’ll inform any people you chose to notify. A 4-week waiting period will begin. This is required by law, to allow anyone with objections to raise them.", "onceEveryoneHasSignedOpgWill": "Once everyone has signed and OPG have received your LPA, we’ll inform any people you chose to notify. A 4-week waiting period will begin. This is required by law, to allow anyone with objections to raise them.", - "wellRegisteredYourLpa": "We’ll register your LPA.", + "wellRegisteredYourLpa": "If no objections are raised, OPG will register your LPA.", "atTheEndOfTheWaitingPeriod": "At the end of the waiting period, we’ll contact you with guidance about getting your LPA reviewed by the Court of Protection.", "atTheEndOfTheWaitingPeriodOpgWill": "At the end of the waiting period, OPG will contact you with guidance about getting your LPA reviewed by the Court of Protection.", "ifYourLpaIsSuccessfullyReviewed": "If your LPA is successfully reviewed by the Court of Protection, we’ll be able to register it, and it can then be used.", "ifTheCOPFindsYourLpaIsValid": "If the Court of Protection finds your LPA is valid, it will direct OPG to register it. Your LPA can then be used.", - "weWillEmailYou": "

We’ll email you to update you with the progress of your LPA’s registration. If there are any problems, we’ll let you know.

You can also track the progress of your LPA by logging back into this service at any time.

", - "signIn4WeeksWarning": { - "one": "{{.CertificateProviderFirstNames}} and your attorney must sign your LPA by {{.SigningDeadline}}. If they do not sign by this date, you will have to pay the application fee again. You will also have to meet with {{.CertificateProviderFirstNames}} and sign your LPA again.", - "other": "{{.CertificateProviderFirstNames}} and your attorneys must sign your LPA by {{.SigningDeadline}}. If they do not sign by this date, you will have to pay the application fee again. You will also have to meet with {{.CertificateProviderFirstNames}} and sign your LPA again." - }, + "weWillEmailYou": "

We will keep you updated about your LPA. If there are any problems, we’ll let you know.

You can also track the progress of your LPA by logging back into this service at any time.

", + "signByDeadlineWarning": "{{.SignatoriesNames}} must sign your LPA by {{.SigningDeadline}} so that it can be registered by OPG.", "copSignDeadlineWarning": { "one": "{{.CertificateProviderFirstNames}} and your attorney must sign your LPA by {{.SigningDeadline}}. After that, you have until {{.SubmissionDeadline}} to submit the LPA to the Court of Protection. If you miss this deadline, you’ll have to fill in a new LPA and pay another registration fee.", "other": "{{.CertificateProviderFirstNames}} and your attorneys must sign your LPA by {{.SigningDeadline}}. After that, you have until {{.SubmissionDeadline}} to submit the LPA to the Court of Protection. If you miss this deadline, you’ll have to fill in a new LPA and pay another registration fee." @@ -415,10 +412,10 @@ "one": "Find a time to meet face-to-face and in private with your certificate provider {{.CertificateProviderFullName}}. Your attorney, {{.AttorneysFullNames}}, should not be present.", "other": "Find a time to meet face-to-face and in private with your certificate provider {{.CertificateProviderFullName}}. Your attorneys, {{.AttorneysFullNames}}, should not be present." }, - "meetFaceToFaceWithoutTrustCorporation": "Find a time to meet face-to-face and in private with your certificate provider {{.CertificateProviderFullName}}. Directors or employees of {{.TrustCorporationsNames}} should not be present.", + "meetFaceToFaceWithoutTrustCorporation": "Find a time to meet face-to-face and in private with your certificate provider {{.CertificateProviderFullName}}. Directors or employees of {{.TrustCorporationName}} should not be present.", "meetFaceToFaceWithoutAttorneysAndTrustCorporation": { - "one": "Find a time to meet face-to-face and in private with your certificate provider {{.CertificateProviderFullName}}. Directors or employees of {{.TrustCorporationsNames}} and your attorney, {{.AttorneysFullNames}}, should not be present.", - "other": "Find a time to meet face-to-face and in private with your certificate provider {{.CertificateProviderFullName}}. Directors or employees of {{.TrustCorporationsNames}} and your attorneys, {{.AttorneysFullNames}}, should not be present." + "one": "Find a time to meet face-to-face and in private with your certificate provider {{.CertificateProviderFullName}}. Directors or employees of {{.TrustCorporationName}} and your attorney, {{.AttorneysFullNames}}, should not be present.", + "other": "Find a time to meet face-to-face and in private with your certificate provider {{.CertificateProviderFullName}}. Directors or employees of {{.TrustCorporationName}} and your attorneys, {{.AttorneysFullNames}}, should not be present." }, "discussWithCertificateProviderContent": "

Read over your LPA to check it’s correct – you’ll be able to make changes if not.

Discuss your LPA with {{.CertificateProviderFullName}}. It’s their responsibility to make sure:

", "signYourLpaStep": "

2. Sign your LPA

When you have signed your LPA using this service, we will send {{.CertificateProviderFullName}} a unique code by text message.

{{.CertificateProviderFullName}} must enter the code into this service within 30 minutes, to prove they witnessed your signature.

", @@ -1460,5 +1457,13 @@ "changingYourLpaTypeContent": "

You cannot change the type of this LPA once you have entered your personal details.

However, you can create a new LPA.

Visit ‘Manage your LPAs’ to delete this LPA and create a new {{.TypeLpa}}.

", "yourPropertyAndAffairsLpaTypeCannotBeChanged": "Your property and affairs LPA cannot be changed to a personal welfare LPA", "yourPersonalWelfareLpaTypeCannotBeChanged": "Your personal welfare LPA cannot be changed to a property and affairs LPA", - "newEvidenceRequired:Exemption": "New evidence required for a fee exemption" + "newEvidenceRequired:Exemption": "New evidence required for a fee exemption", + "nowYouHaveSubmittedMustBeSignedWithinTwoYears": "Now that you’ve submitted your LPA to the Office of the Public Guardian (OPG), it must be signed and returned to OPG by your certificate provider and attorneys within two years, that is, by:", + "opgWillContactCertificateProviderWithin": "OPG will contact {{.CertificateProviderFullName}} and ask them to confirm their identity and provide the certificate for your LPA within 6 months, or by {{.DeadlineDate}}", + "opgWillThenContactAttorneys": { + "one": "OPG will then contact {{.Names}} and ask them to sign your LPA as your attorney.", + "other": "OPG will then contact {{.Names}} and ask them to sign your LPA as your attorneys." + }, + "confirmYourIdentityByReturning": "Confirm your identity by returning to your task list. OPG can’t register your LPA until you confirm your identity.", + "aSignatoryFromTrustCorporation": "a signatory from {{.TrustCorporationName}}" } diff --git a/web/template/donor/choose_your_certificate_provider.gohtml b/web/template/donor/choose_your_certificate_provider.gohtml index 7a6cc51265..08be93628c 100644 --- a/web/template/donor/choose_your_certificate_provider.gohtml +++ b/web/template/donor/choose_your_certificate_provider.gohtml @@ -13,12 +13,12 @@

{{ tr .App "chooseSomeoneYoureComfortableHavingAConversationWith" }}

- {{ if eq (len .Donor.TrustCorporationsNames) 0 }} + {{ if not .Donor.HasTrustCorporation }} {{ trFormatHtml .App "whoCannotBeACertificateProviderAttorneys" "AttorneysFirstNamesOr" (concatOr .App .Donor.AllLayAttorneysFirstNames) }} {{ else if eq (len .Donor.AllLayAttorneysFirstNames) 0 }} - {{ trFormatHtml .App "whoCannotBeACertificateProviderTrustCorporation" "TrustCorporationsNames" (concatOr .App .Donor.TrustCorporationsNames) }} + {{ trFormatHtml .App "whoCannotBeACertificateProviderTrustCorporation" "TrustCorporationName" .Donor.TrustCorporation.Name }} {{ else }} - {{ trFormatHtml .App "whoCannotBeACertificateProviderAttorneysAndTrustCorporation" "AttorneysNames" (concatComma .Donor.AllLayAttorneysFullNames) "TrustCorporationsNames" (concatOr .App .Donor.TrustCorporationsNames) }} + {{ trFormatHtml .App "whoCannotBeACertificateProviderAttorneysAndTrustCorporation" "AttorneysNames" (concatComma .Donor.AllLayAttorneysFullNames) "TrustCorporationName" .Donor.TrustCorporation.Names }} {{ end }} {{ trHtml .App "detailsYoullNeedAboutYourCertificateProvider" }} diff --git a/web/template/donor/how_to_sign_your_lpa.gohtml b/web/template/donor/how_to_sign_your_lpa.gohtml index d7312b49ef..b0a26c55b4 100644 --- a/web/template/donor/how_to_sign_your_lpa.gohtml +++ b/web/template/donor/how_to_sign_your_lpa.gohtml @@ -14,7 +14,7 @@

{{ trFormat .App "discussWithCertificateProviderStep" "CertificateProviderFullName" .Donor.CertificateProvider.FullName }}

- {{ if eq (len .Donor.TrustCorporationsNames) 0 }} + {{ if not .Donor.HasTrustCorporation }} {{ trFormatCount .App "meetFaceToFaceWithoutAttorneys" (len .Donor.AllLayAttorneysFullNames) "CertificateProviderFullName" .Donor.CertificateProvider.FullName @@ -22,19 +22,19 @@ {{ else if eq (len .Donor.AllLayAttorneysFullNames) 0 }} {{ trFormat .App "meetFaceToFaceWithoutTrustCorporation" "CertificateProviderFullName" .Donor.CertificateProvider.FullName - "TrustCorporationsNames" (concatAnd .App .Donor.TrustCorporationsNames) }} + "TrustCorporationName" .Donor.TrustCorporation.Name }} {{ else }} {{ trFormatCount .App "meetFaceToFaceWithoutAttorneysAndTrustCorporation" (len .Donor.AllLayAttorneysFullNames) "CertificateProviderFullName" .Donor.CertificateProvider.FullName - "TrustCorporationsNames" (concatAnd .App .Donor.TrustCorporationsNames) + "TrustCorporationName" .Donor.TrustCorporation.Name "AttorneysFullNames" (concatAnd .App .Donor.AllLayAttorneysFullNames) }} {{ end }}

{{ trFormatHtml .App "discussWithCertificateProviderContent" "CertificateProviderFullName" .Donor.CertificateProvider.FullName }} - + {{ if .Donor.Donor.CanSign.IsYes }} {{ trFormatHtml .App "signYourLpaStep" "CertificateProviderFullName" .Donor.CertificateProvider.FullName }} {{ else }} diff --git a/web/template/donor/you_have_submitted_your_lpa.gohtml b/web/template/donor/you_have_submitted_your_lpa.gohtml index cd59591968..123f897566 100644 --- a/web/template/donor/you_have_submitted_your_lpa.gohtml +++ b/web/template/donor/you_have_submitted_your_lpa.gohtml @@ -9,7 +9,7 @@

{{ tr .App "submittedYourLpa" }}

-

{{ tr .App "whatHappensNext" }}

+

{{ tr .App "whatHappensNext" }}

{{ if .Donor.RegisteringWithCourtOfProtection }}

{{ tr .App "thanksWeCannotRegisterUntilCourtOfProtection" }}

@@ -23,27 +23,37 @@

{{ tr .App "youCanTrackTheProgressByLoggingBackIn" }}

- + {{ template "warning" (content .App (trFormatCount .App "copSignDeadlineWarning" .Donor.Attorneys.Len "CertificateProviderFirstNames" .Donor.CertificateProvider.FirstNames "SigningDeadline" (formatDate .App .Donor.SigningDeadline) "SubmissionDeadline" (formatDate .App .Donor.CourtOfProtectionSubmissionDeadline))) }} - {{ else }} + {{ else }} +

{{ tr .App "nowYouHaveSubmittedMustBeSignedWithinTwoYears" }}

+ +
+

{{ formatDate .App .Donor.SigningDeadline }}

+
+
    -
  1. {{ trFormat .App "weWillContactYourCertificateProvider" "FirstNames" .Donor.CertificateProvider.FirstNames }}
  2. -
  3. {{ trFormatCount .App "weWillThenContactAttorneys" .Donor.Attorneys.Len "FullNames" (concatAnd .App .Donor.Attorneys.FullNames) }}
  4. + {{ if not .Donor.Tasks.ConfirmYourIdentity.IsCompleted }} +
  5. {{ tr .App "confirmYourIdentityByReturning" }}
  6. + {{ end }} +
  7. {{ trFormat .App "opgWillContactCertificateProviderWithin" "CertificateProviderFullName" .Donor.CertificateProvider.FullName "DeadlineDate" (formatDate .App .Donor.CertificateProviderDeadline) }}
  8. + {{ $attorneysNames := .Donor.AttorneysNames .App.Localizer }} +
  9. {{ trFormatCount .App "opgWillThenContactAttorneys" (len $attorneysNames) "Names" (concatAnd .App $attorneysNames) }}
  10. {{ tr .App "onceEveryoneHasSigned" }}
  11. {{ tr .App "wellRegisteredYourLpa" }}
{{ trHtml .App "weWillEmailYou" }} - {{ template "warning" (content .App (trFormatCount .App "signIn4WeeksWarning" .Donor.Attorneys.Len - "CertificateProviderFirstNames" .Donor.CertificateProvider.FirstNames + {{ template "warning" (content .App (trFormat .App "signByDeadlineWarning" + "SignatoriesNames" (concatAnd .App (.Donor.SignatoriesNames .App.Localizer)) "SigningDeadline" (formatDate .App .Donor.SigningDeadline))) }} {{ end }} - + {{ tr .App "continue" }}