Copy of answers#2113
Conversation
d17829e to
b314590
Compare
stephencdaly
left a comment
There was a problem hiding this comment.
I've left a bunch of style comments, it's up to you if you want to make the suggested changes for these.
The things that we should change are:
- We need a test for when the
send_copy_of_answersisn't present on the form document to prevent regressions. - We shouldn't show the extra section on the check your answers page if
send_copy_of_answersis disabled for the form. - The Welsh translations should have curly quotes
2c6af57 to
0e48db2
Compare
There was a problem hiding this comment.
Changes now work as expected. We just need to add a test to form_spec.rb for when the field is missing from the form document.
The Welsh translations haven't been updated to use curly quotes - you should just be able to apply my suggestions using the "Add suggestion batch" button on the comments to put them all in one commit.
9a1141a to
d0247ba
Compare
stephencdaly
left a comment
There was a problem hiding this comment.
All good now, thanks for making those changes!
A new attribute has been added to Forms. It allows editors to set whether fillers get to see the CopyOfAnswers page on their form.
We don't just want to show the page on checking the feature flag, but also if it's allowed for the form itself anyway.
To also check that the form itself is meant to show the Copy Of Answers page.
The feature is now controlled by the form's send_copy_of_answers attribute rather than a global feature flag.
Switches from a plain text body key to body_html so the multi-paragraph explanation of the One Login journey can be rendered correctly.
When a user has already opted in to a copy of answers via One Login and we have their email address, the CYA page no longer shows the separate confirmation email radio buttons. Instead it shows a summary of their copy-of-answers choice with a change link, and the form submits with send_confirmation: "skip_confirmation" implicitly. Also removes the remaining FeatureService check from back_link.
When the user opted in via One Login and we have their email, display a specific "we've sent a copy of your answers" message rather than the generic confirmation email message.
…s is chosen This is the first step to refactoring, as we are doing too much logic in too many places for this check.
Co-authored-by: Stephen Daly <stephen.daly@digital.cabinet-office.gov.uk>
d0247ba to
06f06ee
Compare
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2113.submit.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
What problem does this pull request solve?
Updates the flow for Copy Of Answers feature and switches from a global feature flag to checking against a value set on the form whether to show that feature to the form filler.
Trello card: https://trello.com/c/KZuqH0bA
Things to consider when reviewing