From 1bf4d00e197b065c253c87d9c3fcc463ab2057a0 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 14 Apr 2016 14:04:41 +0100 Subject: [PATCH] Make subject a textarea MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order for subject lines to have their fields highlighted they have to be textboxes. This is because the highlighting script only works with textboxes that don’t scroll, either horizontally, vertically, or be keying through them. --- app/main/forms.py | 2 +- app/templates/views/edit-email-template.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 83efd2c9f..04d9e4cc7 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -212,7 +212,7 @@ class SMSTemplateForm(Form): class EmailTemplateForm(SMSTemplateForm): - subject = StringField( + subject = TextAreaField( u'Subject', validators=[DataRequired(message="Can’t be empty")]) diff --git a/app/templates/views/edit-email-template.html b/app/templates/views/edit-email-template.html index a27fc5994..b0dcfc11b 100644 --- a/app/templates/views/edit-email-template.html +++ b/app/templates/views/edit-email-template.html @@ -15,8 +15,8 @@
- {{ textbox(form.name, width='1-1', hint='Your recipients won’t see this') }} - {{ textbox(form.subject, width='1-1') }} + {{ textbox(form.name, width='1-1', hint='Your recipients won’t see this', rows=10) }} + {{ textbox(form.subject, width='1-1', rows=2) }}
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }}