From 3fa0e3aa6624e06f400839eeaa1cd0c407e49e2d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 20 Jun 2016 11:38:30 +0100 Subject: [PATCH] Give more guidance about what to put in templates There are some common questions that keep coming up when users are editing or creating templates. This commit adds a pattern for sections of guidance which can be shown/hidden. It then modifies the guidance as follows. Change: - guidance about placeholders; give an example about what to do and what not to do (because the mistake we keep seeing people make is putting the thing itself, not the name of the thing) Add (pretty basic at the moment but a need for these has come out of research): - guidance about links - guidance about message length for text messages --- .../stylesheets/components/secondary-button.scss | 9 +++++++++ .../templates/guidance-character-count.html | 12 ++++++++++++ .../partials/templates/guidance-links.html | 8 ++++++++ .../templates/guidance-personalisation.html | 14 ++++++++++++++ app/templates/views/edit-email-template.html | 14 ++++++-------- app/templates/views/edit-sms-template.html | 15 +++++++-------- 6 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 app/templates/partials/templates/guidance-character-count.html create mode 100644 app/templates/partials/templates/guidance-links.html create mode 100644 app/templates/partials/templates/guidance-personalisation.html diff --git a/app/assets/stylesheets/components/secondary-button.scss b/app/assets/stylesheets/components/secondary-button.scss index 6e7a0ff7c..2aef3ffb4 100644 --- a/app/assets/stylesheets/components/secondary-button.scss +++ b/app/assets/stylesheets/components/secondary-button.scss @@ -6,3 +6,12 @@ padding-right: 0; text-align: center; } + +.tertiary-button { + @include button($grey-3); + padding: 0.3em 0.1em 0.2em 0.1em; + width: 100%; + padding-left: 0; + padding-right: 0; + text-align: left; +} diff --git a/app/templates/partials/templates/guidance-character-count.html b/app/templates/partials/templates/guidance-character-count.html new file mode 100644 index 000000000..b11dae62e --- /dev/null +++ b/app/templates/partials/templates/guidance-character-count.html @@ -0,0 +1,12 @@ +
+ Message length +
+

+ If your message is long then it will + cost more. +

+

+ See pricing for details. +

+
+
diff --git a/app/templates/partials/templates/guidance-links.html b/app/templates/partials/templates/guidance-links.html new file mode 100644 index 000000000..2d0b7131e --- /dev/null +++ b/app/templates/partials/templates/guidance-links.html @@ -0,0 +1,8 @@ +
+ Links and URLs +
+

+ Always use full URLs, including the http:// +

+
+
diff --git a/app/templates/partials/templates/guidance-personalisation.html b/app/templates/partials/templates/guidance-personalisation.html new file mode 100644 index 000000000..c395f42e6 --- /dev/null +++ b/app/templates/partials/templates/guidance-personalisation.html @@ -0,0 +1,14 @@ +
+ Personalisation +
+

+ Use double brackets to add personalisation. +

+

+ Yes: ((name)) +

+

+ No: ((Helen)) +

+
+
diff --git a/app/templates/views/edit-email-template.html b/app/templates/views/edit-email-template.html index ab0492963..1e3db961c 100644 --- a/app/templates/views/edit-email-template.html +++ b/app/templates/views/edit-email-template.html @@ -16,9 +16,9 @@
{{ textbox(form.name, width='1-1', hint='Your recipients won’t see this', rows=10) }} + {{ textbox(form.subject, width='1-1', highlight_tags=True, rows=2) }}
- {{ textbox(form.subject, width='1-1', highlight_tags=True, rows=2) }} {{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }} {{ page_footer( 'Save', @@ -26,13 +26,11 @@ delete_link_text='Delete this template' ) }}
-
- -
+
diff --git a/app/templates/views/edit-sms-template.html b/app/templates/views/edit-sms-template.html index ee4778fa9..45d6d7fe4 100644 --- a/app/templates/views/edit-sms-template.html +++ b/app/templates/views/edit-sms-template.html @@ -18,20 +18,19 @@ {{ textbox(form.name, width='1-1', hint='Your recipients won’t see this') }}
- {{ textbox(form.template_content, highlight_tags=True, width='1-1') }} + {{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=5) }} {{ page_footer( 'Save', delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template_id) if template_id or None, delete_link_text='Delete this template' ) }}
-
- -
+