Make blank letter template on adding

When adding a letter it’s hard to know how the stuff you’re typing is
going to look. So rather than go straight to the edit form let’s show
users a blank letter. They can then choose which part of it they want
to edit first. And will have a better idea of how their changes are
going to show up.

In research we also saw nervousness around saving a template and wanting
to ‘preview’ it first. Hopefully this flow will make people feel less
precious about saving a template because they’ve already done it once
just by creating the template.
This commit is contained in:
Chris Hill-Scott
2017-03-15 10:53:24 +00:00
parent 2ba8ff479c
commit 96f505a7e7

View File

@@ -178,6 +178,22 @@ def add_template_by_type(service_id):
)
if form.validate_on_submit():
if form.template_type.data == 'letter':
blank_letter = service_api_client.create_service_template(
'Untitled',
'letter',
'Content',
service_id,
'Title',
'normal',
)
return redirect(url_for(
'.view_template',
service_id=service_id,
template_id=blank_letter['data']['id'],
))
return redirect(url_for(
'.add_service_template',
service_id=service_id,