Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure user chooses supertype / document type #115

Merged
merged 1 commit into from Aug 10, 2018

Conversation

benthorner
Copy link
Contributor

https://trello.com/c/EDDD2DYl/128-handle-when-the-user-doesnt-select-a-supertype-or-document-type

This prevents the user reaching an error page in the case where they
forget to choose a supertype or a document type, and then click the
'Continue' button when creating a document.

The page to choose a document type was previously a POST route, which
made it awkward to re-visit the page if the user doesn't select a
document type and clicks 'Continue'. To support re-visiting the page,
the route is now a GET route and the form_tag for choosing a supertype
now has the explicit route to get to it, turning off the UTF8 character
set param to keep the resulting URL query params clean.

Note that there's still a spurious 'button' query param, which is added by the
form submit button. There's a separate PR to fix this: alphagov/govuk_publishing_components#479.

This prevents the user reaching an error page in the case where they
forget to choose a supertype or a document type, and then click the
'Continue' button when creating a document.

The page to choose a document type was previously a POST route, which
made it awkward to re-visit the page if the user doesn't select a
document type and clicks 'Continue'. To support re-visiting the page,
the route is now a GET route and the form_tag for choosing a supertype
now has the explicit route to get to it, turning off the UTF8 character
set param to keep the resulting URL query params clean.
Copy link
Contributor

@emmabeynon emmabeynon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@benthorner benthorner merged commit efd88fb into master Aug 10, 2018
@benthorner benthorner deleted the ensure-user-chooses-a-format branch August 10, 2018 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants