diff --git a/app/main/views/templates.py b/app/main/views/templates.py index 09eea1906..15f72b113 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -31,7 +31,11 @@ def add_service_template(service_id, template_type): if form.validate_on_submit(): tdao.insert_service_template( - form.name.data, template_type, form.template_content.data, service_id, form.subject.data or None + form.name.data, + template_type, + form.template_content.data, + service_id, + form.subject.data if hasattr(form, 'subject') else None ) return redirect( url_for('.choose_template', service_id=service_id, template_type=template_type) diff --git a/app/templates/views/edit-email-template.html b/app/templates/views/edit-email-template.html index b0c983f65..3f9ec239f 100644 --- a/app/templates/views/edit-email-template.html +++ b/app/templates/views/edit-email-template.html @@ -14,12 +14,8 @@
{{ textbox(form.name, width='1-1') }} - {% if 'email' == template_type %} - {{ textbox(form.subject, width='1-1') }} - {% endif %} + {{ textbox(form.subject, width='1-1') }}
-
-
{{ textbox(form.template_content, highlight_tags=True, width='1-1') }}
diff --git a/app/templates/views/edit-sms-template.html b/app/templates/views/edit-sms-template.html index 8c8d5e1c5..b8b44a927 100644 --- a/app/templates/views/edit-sms-template.html +++ b/app/templates/views/edit-sms-template.html @@ -14,12 +14,7 @@
{{ textbox(form.name, width='1-1') }} - {% if 'email' == template_type %} - {{ textbox(form.subject, width='1-1') }} - {% endif %}
-
-
{{ textbox(form.template_content, highlight_tags=True, width='1-1') }}
diff --git a/app/templates/views/service_dashboard.html b/app/templates/views/service_dashboard.html index b17c935ba..bc70de076 100644 --- a/app/templates/views/service_dashboard.html +++ b/app/templates/views/service_dashboard.html @@ -35,7 +35,7 @@ """.format( - url_for(".add_service_template", service_id=service_id), + url_for(".add_service_template", service_id=service_id, template_type="sms"), url_for(".choose_template", service_id=service_id, template_type="sms") )|safe, subhead='Get started',