Merge pull request #266 from alphagov/better-placeholder-guidance

Fix bugs and gripes with adding and editing templates
This commit is contained in:
Chris Hill-Scott
2016-03-14 10:45:00 +00:00
13 changed files with 118 additions and 78 deletions

View File

@@ -37,8 +37,8 @@ send_messages_page_headings = {
manage_templates_page_headings = {
'email': 'Manage templates',
'sms': 'Manage templates'
'email': 'Email templates',
'sms': 'Text message templates'
}

View File

@@ -13,6 +13,11 @@ form_objects = {
'sms': SMSTemplateForm
}
page_headings = {
'email': 'email',
'sms': 'text message'
}
@main.route("/services/<service_id>/templates/add-<template_type>", methods=['GET', 'POST'])
@login_required
@@ -42,7 +47,8 @@ def add_service_template(service_id, template_type):
'views/edit-{}-template.html'.format(template_type),
form=form,
template_type=template_type,
service_id=service_id
service_id=service_id,
heading_action='Add'
)
@@ -70,7 +76,8 @@ def edit_service_template(service_id, template_id):
form=form,
service_id=service_id,
template_id=template_id,
template_type=template['template_type']
template_type=template['template_type'],
heading_action='Edit'
)