This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
FS-3664 Read-only summary flag on the summary page #551
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.
Description
This introduces a new flag
is_read_only_summary
that can be passed in the existingmetadata
payload when instantiating a new form. This instructs the summary page to not show "Change" links on the questions summary list and provides a direct back link.The
is_read_only_summary
flag can be used along withoptions.redirectPath
to direct the user to a read-only view of data they've previously provided.Currently this fixes the back link and page title text for the summary page according to if the flag is set but it would be preferable for these values to be set using options bassed in my the service requesting a new form rather than fixed in the form logic -- if there are existing
options
payloads for customising this we should move to use those.I'm applying the change to the existing custom form builder as well as the newer form builder adpater to not be blocked on deployments as the new patterns gains maturity and is released in different environments.
Note it doesn't look like individual flags like this are curretly covered by tests even though they can change the behaviour of the server, I'll look to do this in lining up with the methodology used by the newer form builder adapter.
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)[ ] This change requires a documentation updateRead only summary page without change links