This commit:
- replaces links that look like buttons with forms and submit buttons
- splits the view code for SMS into its own file
- moves the routing into the Python by adding handling for `post` requests
- uses Flask’s `url_for` to generate URLs, rather than hard coding them (so that
it’s easier to change the URLs)
- chages the URLs for sending text messages
We could do something with Javascript to only show the selected template. For
now this is something that works without Javascript.
This means we can put off getting the build and testing pipeline for Javascript
set up, which is a bigger and more unknown piece of work.
Since GOV.UK Elements is versionned now it makes sense to bring it in as a
dependency. This enforces a separation between what generic stuff we’re using
from Elements and what is specific to our app.
The benefit is that when the generic stuff changes it will be easy to bring
those changes in.
This commit also bumps GOV.UK frontend toolkit to the latest version (v4.5.0).
This commit adds some stubbed data for the pages. The structure of the data
is just a proposal, but it gives the templates something to work with for now.
As a first guess placeholders can be added to messages with the
`((placeholder))` syntax.
This commit adds a Jinja template filter to convert strings containing
said-formatted strings into HTML, which can then be styled to highlight which
parts will be substituted in messages.
Main thing that was missing was including the main CSS file in the template.
There are a few hacky bits here, like moving the whole of toolkit inside the
stylesheets directory.
Would arguably be cleaner using something that isn’t Flask Assets, but that’s
something for later.
The codes are hashed and saved to the db.
The code is marked as used once a valid code is submitted.
The code is valid for 1 hour.
The codes are no longer saved to the session.
When a person registers with a valid mobile number and email address,
a code will be sent to each. That person can enter the verify codes and continue to the add-service page.