Add markdown for exit pages #704
Merged
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.
Add columns for storing the markdown content for exit pages to Condition
Trello card: https://trello.com/c/LYs67GUv/2150-add-somewhere-to-store-exit-page-guidance-in-our-database
This PR adds two columns to the Condition model for storing the heading and markdown content for exit pages.
Exit pages will be represented by a Condition with check_page_id, routing_page_id set and a string value, which could be "", for exit_page_markown.
The Condition validation which reports an error when the goto_page is nil has been changed to ignore exit pages.
It doesn't add any other validations we might need for exit pages. The guidance content stored in pages uses validations which might be useful such as checking the heading is set if the content is set and checks on content and length.
The branching example form in the seed has been extended to include an exit page.
We are keeping the admin and API database table definitions in sync to make migrating easier. Another PR will be raised against admin when this is approved to add the same fields to the conditions table.
Displaying exit pages to form fillers and allowing form creators to create and change exit pages and separate tickets.
Things to consider when reviewing