diff --git a/app/assets/stylesheets/components/email-message.scss b/app/assets/stylesheets/components/email-message.scss index b4771841a..860b3d99e 100644 --- a/app/assets/stylesheets/components/email-message.scss +++ b/app/assets/stylesheets/components/email-message.scss @@ -7,9 +7,26 @@ margin: 20px 0 10px 0; } - &-subject, - &-from { - margin: 10px 0; + &-meta { + + @include core-19; + margin: 0; + + td, + th { + @include core-19; + border-bottom: 0; + border-top: 1px solid $border-colour; + } + + th { + color: $secondary-text-colour; + } + + td { + width: 99%; + } + } &-from { diff --git a/app/assets/stylesheets/components/sms-message.scss b/app/assets/stylesheets/components/sms-message.scss index 898d04c24..cb26b296f 100644 --- a/app/assets/stylesheets/components/sms-message.scss +++ b/app/assets/stylesheets/components/sms-message.scss @@ -40,7 +40,7 @@ .sms-message-use-links { @include copy-19; - margin-top: 55px; + margin-top: 52px; a { diff --git a/app/main/views/templates.py b/app/main/views/templates.py index 01f3711dd..09eea1906 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -31,7 +31,7 @@ def add_service_template(service_id, template_type): if form.validate_on_submit(): tdao.insert_service_template( - form.name.data, template['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 or None ) return redirect( url_for('.choose_template', service_id=service_id, template_type=template_type) diff --git a/app/templates/components/email-message.html b/app/templates/components/email-message.html index b619b16fa..4b0047651 100644 --- a/app/templates/components/email-message.html +++ b/app/templates/components/email-message.html @@ -9,29 +9,27 @@ {% endif %}
- {% if from_name and from_address %} -
-
-
- From -
-
- {{ from_name }} <{{ from_address }}> -
-
-
- {% endif %} - {% if subject %} -
-
-
- Subject -
-
- {{ subject }} -
-
-
+ {% if from_name or subject %} + + + {% if from_name and from_address %} + + + + + {% endif %} + {% if subject %} + + + + + {% endif %} + +
From + {{ from_name }} <{{ from_address }}> +
{% endif %}
{{ body|nl2br }} diff --git a/app/templates/views/choose-email-template.html b/app/templates/views/choose-email-template.html index fb5fe2b1f..5452a5da8 100644 --- a/app/templates/views/choose-email-template.html +++ b/app/templates/views/choose-email-template.html @@ -29,7 +29,7 @@ {% endif %}

- Add a new template + Add a new template