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

allow redirect to policy page from postcode page #1254

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

struan
Copy link
Member

@struan struan commented Apr 12, 2017

Add the ability to specify a policy set or policy to visit after the user has set their postcode at /postcode so that we can link to a policy from e.g. social media.

By adding either ?policy_set=social or ?policy_number=6710 the postcode page will redirect to the relevant policy set or policy page for the MP.

If the user is in Scotland or Northern Ireland the choose representative page isn't shown as we only have policies for MPs so offering them a choice to see an MSP or MLA isn't going to be useful.

There's also a change to the postcode form title to indicate that putting in a postcode is part of the process of getting the information.

screen shot 2017-04-13 at 16 45 29

Fixes #1248

@struan struan force-pushed the issues/1248-redirect-after-postcode branch from 05eb06f to 37929db Compare April 13, 2017 15:18
Used if we need to pass extra things like policy numbers along to the
postcode page
Used for linking to policy sets from outside TWFY, e.g. from social
media.
Allow a different title on the postcode page for e.g. cases where we
will be redirecting afterwards and we want to reassure the user that
this is part of the process.
If we are redirecting to a policy or policy set then change the title of
the postcode form to mention the policy/set to reassure the user they
are on the right track.
The test framework runs under CLI which means the headers aren't
printed so we can't test redirects. To get round this check if we are
running under the CLI and then print out the header.
@struan struan force-pushed the issues/1248-redirect-after-postcode branch from 37929db to 63431d6 Compare April 13, 2017 15:50
Add postcode_lookup rows in fixtures for tests that do postcode lookupts
so that:
  * tests run offline
  * we don't have problems with mapit quotas
@struan struan changed the title WIP allow redirect to policy page from postcode page allow redirect to policy page from postcode page Apr 17, 2017
It was unlikely that anyone would see this page before because it would
only be linked to if the MP had voted. Now that we can redirect to this
page it's more likely that it will be seen so tidy it up a bit.
@dracos dracos force-pushed the master branch 4 times, most recently from 2012ddf to 9813413 Compare February 5, 2018 12:51
@dracos dracos force-pushed the master branch 7 times, most recently from f82bb7e to aac1a80 Compare September 6, 2018 15:38
@struan struan unassigned mhl Oct 11, 2018
@dracos dracos force-pushed the master branch 4 times, most recently from c858a71 to 5ddba3b Compare October 11, 2018 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Links from Adwords landing pages
2 participants