aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-05-03 13:31:57 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-05-07 15:01:07 +0100
commit0236d3a37da94e06e9e6208f50f6c0b9388feb7c (patch)
tree53a206661f0b46303faaa3cf1e77c748f59b1621 /templates
parentb8fd2a09332798214188cbedecb85294645c06dc (diff)
Prevent creation of two templates with same title.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/admin/template_edit.html4
-rw-r--r--templates/web/zurich/admin/template_edit.html3
2 files changed, 6 insertions, 1 deletions
diff --git a/templates/web/base/admin/template_edit.html b/templates/web/base/admin/template_edit.html
index 2945e36c5..87218c7dd 100644
--- a/templates/web/base/admin/template_edit.html
+++ b/templates/web/base/admin/template_edit.html
@@ -13,7 +13,9 @@
<p class="error">[% loc('Please correct the errors below') %]</p>
[% END %]
-
+ [% IF errors.title %]
+ <div class="form-error">[% errors.title %]</div>
+ [% END %]
<div class="admin-hint">
<p>
[% loc('This is a <strong>private</strong> name for this template so you can identify it when updating reports or editing in the admin.') %]
diff --git a/templates/web/zurich/admin/template_edit.html b/templates/web/zurich/admin/template_edit.html
index e954d566c..b6f68106c 100644
--- a/templates/web/zurich/admin/template_edit.html
+++ b/templates/web/zurich/admin/template_edit.html
@@ -16,6 +16,9 @@
accept-charset="utf-8"
class="validate">
+ [% IF errors.title %]
+ <div class="form-error">[% errors.title %]</div>
+ [% END %]
<p>
<strong>[% loc('Title:') %] </strong>
<input type="text" name="title" class="form-control required" size="30" value="[% rt.title| html %]">