alphagov/whitehall — pull request #423 by h-lame (2013-04-10 09:43:58+00:00)
Title: Email signup frontend

For: https://www.pivotaltracker.com/story/show/45939831

Provide a UI for allowing gov.uk visitors to sign up to alerts from gov delivery. An alert is a mixture of a type of documents, a topics, and an organisation (they can choose "all" for any or all of those). We then turn this into a topic_id for govdelivery and redirect the user to the sign up page for that topic on gov delivery.

Known problems:

1. 8448b758c5ef86fffb7c3f1f5583c824fb9424d1 - We use a method on the govuk_delivery api adaptor that doesn't exist yet. We give it a gov delivery topic and it gives us a url to redirect the user to for signing up to be alerted on that topic
2. 8448b758c5ef86fffb7c3f1f5583c824fb9424d1 (again) - We assume that the return value of ``Whitehall.govuk_delivery_client.topic`` is an object representing a govuk_delivery topic, but at present it's just the response body from calling the api method.
3. 70e01a0a1ec996c7c6f4beb95294340747d42ebc - the UI as designed allows the user to sign up to multiple alerts in one operation, however the gov delivery url that we redirect to for signup only allows a single topic to be provided, so we've intentionally crippled the UI to allow only a single alert. (also in 202b9fc5ea82e6090732d9f0725ba93450628502 we explicitly only deal with the first alert created by the params).