Conversation
Add a new association to Form to link live Welsh FormDocuments.
Add a new method to the form document sync service to archive only the Welsh part of a form. To archive the Welsh part of a form, we need to: - remove any pre-existing archived document Welsh form - change the live Welsh form to archived - update the content of the english versions live and draft to show that it doesn't support welsh anymore - set Welsh completed to false on the form We don't remove the Welsh translation from the Mobility tables so the User still has a chance to edit it and make it live again.
The archive service is already responsible for archiving the live form document. We add a new method to archive the welsh form document. To archive an English form we use the state machine and callbacks to ensure the state of the form is consistent. But to archive only the Welsh part of a form we call the FormDocumentSyncService directly. This is because archiving a Welsh form doesn't change the state of a form. We can't use the state machine because we aren't changing the state of a form.
Add a new view to let users confirm they want to archive the welsh version of a form. This closely follows the process for archiving a form and we could have reused the code. The content and controller will be different though so it doesn't seem worth the extra complexity to do so.
Add a new controller which will handle archiving the Welsh version of a form. Add routes for archiving welsh
Add a button to archive the Welsh version of a form. The button should only be visible if the form has a live, Welsh translation.
6bd242b to
8bbc59b
Compare
|
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2564.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.



Allow users to archive only the Welsh from a live form, leaving the English form live
Trello card: https://trello.com/c/IEoXqij5/2810-make-it-possible-to-archive-the-welsh-version-of-a-form
This PR adds a new button to the live form page for forms with Welsh. The button allows a user to 'archive' the Welsh part of a form, leaving only the English one live.
We archive a the Welsh form by removing 'cy' from the available languages and marking welsh_complete as false. This lets the user make changes to the English form live and leaves the Welsh text alone. If the user wants to make the Welsh live again, they will need to submit the welsh translation page and make the form live again.
The wording on the content was tweaked because it's not possible to view the Welsh in preview. It needs to be reviewed by a content designer:
This is new content which should also be reviewed by a content designer.

Things to consider when reviewing