aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/admin/template_edit.html
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-08-23 17:28:11 +0100
committerDave Arter <davea@mysociety.org>2016-09-08 09:45:58 +0100
commit1444841970096122c9aeb5e86c82bede01b1bee6 (patch)
tree79b96fda21ce35037d05065644a1043077bf1717 /templates/web/base/admin/template_edit.html
parent80a01c11f656f19d6df4c2e4294f613db14689b1 (diff)
Extend response templates to work across all cobrands
This builds on the response templates in the Zürich cobrand: - Allow response templates to be assigned to categories - Also adds a auto_response flag, which will be used to automatically create updates when reports are made. - Include response templates select box on update form For mysociety/fixmystreetforcouncils#31
Diffstat (limited to 'templates/web/base/admin/template_edit.html')
-rw-r--r--templates/web/base/admin/template_edit.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/templates/web/base/admin/template_edit.html b/templates/web/base/admin/template_edit.html
new file mode 100644
index 000000000..54058a04c
--- /dev/null
+++ b/templates/web/base/admin/template_edit.html
@@ -0,0 +1,50 @@
+[% INCLUDE 'admin/header.html' title=tprintf(loc('Response Template for %s'), body.name) -%]
+[% rt = response_template %]
+
+[% UNLESS rt.id %]<h3>[% loc('New template') %]</h3>[% END %]
+
+<form method="post"
+ action="[% c.uri_for('templates', body.id, rt.id || 'new' ) %]"
+ enctype="application/x-www-form-urlencoded"
+ accept-charset="utf-8"
+ class="validate">
+
+ <p>
+ <strong>[% loc('Title:') %] </strong>
+ <input type="text" name="title" class="required" size="30" value="[% rt.title| html %]">
+ </p>
+ <p>
+ <strong>[% loc('Text:') %] </strong>
+ <textarea name="text" class="required">[% rt.text |html %]</textarea>
+ </p>
+ <p>
+ <label>
+ <strong>[% loc('Auto-response:') %]</strong>
+ <input type="checkbox" name="auto_response" [% 'checked' IF rt.auto_response %] />
+ </label>
+ </p>
+ <p>
+ <strong>[% loc('Categories:') %]</strong>
+ <ul>
+ [% FOR contact IN contacts %]
+ <li>
+ <label>
+ <input type="checkbox" name="contacts[[% contact.id %]]" [% 'checked' IF contact.active %]/>
+ [% contact.category %]
+ </label>
+ </li>
+ [% END %]
+ </ul>
+ </p>
+ <p>
+ <input type="hidden" name="token" value="[% csrf_token %]" >
+ <input type="submit" name="Edit templates" value="[% rt.id ? loc('Save changes') : loc('Create template') %]" >
+ </p>
+ [% IF rt.id %]
+ <p>
+ <input class="delete" type="submit" name="delete_template" value="[% loc('Delete template') %]">
+ </p>
+ [% END %]
+</form>
+
+[% INCLUDE 'admin/footer.html' %]