Add task to enable form fillers to get a copy of their answers#2778
Open
stephencdaly wants to merge 7 commits into
Open
Add task to enable form fillers to get a copy of their answers#2778stephencdaly wants to merge 7 commits into
stephencdaly wants to merge 7 commits into
Conversation
23126af to
4bbc2d2
Compare
66e39cd to
64169a5
Compare
Add a template and input object for enabling form fillers to select to receive a copy of their answers. This page has a checkbox with a checked value of "enabled" and an unchecked value of "disabled". We use the value to directly set the value of `send_copy_of_answers` on the form. Add validation that the value is an allowed value to prevent saving invalid user input should someone tamper with the request. Use a generic error message that we use in other places for unexpected invalid input.
Add controller and routes for the page to enable the option for form fillers to get a copy of their answers.
form.disabled?/form.enabled? methods provided by the enum are a bit confusing. Add a prefix to make these clearer.
The status will be "Completed" when it is enabled and "Optional" when it is disabled.
This task is optional and appears in the same sub-section as the payment link task. The subsection heading is now "Optional tasks" rather than "Optional task" as there are now two tasks under it.
Only show the task in the task list if the send_filler_answers feature flag is enabled. Also return a 404 if the user tries to access the copy of answers page when the feature flag is disabled.
If send_copy_of_answers is enabled for the live form, show a section on the live form page. We don't need to check the feature flag because we don't display anything if send_copy_of_answers is disabled.
64169a5 to
292f130
Compare
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2778.admin.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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this pull request solve?
Trello card: https://trello.com/c/dWxbkDaz
Things to consider when reviewing