aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-01-20 12:51:42 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-01-20 13:11:28 +0000
commit5d4c7be61ea01280fa618ca421dbee5b9e97f56a (patch)
tree7348304cadf8bdb6ad59f184526a87433884cca1
parent18ab1363f57e5db40a1103c1c89cb423de1b5274 (diff)
Add staging warning on admin body pages if needed.
If a staging site and SEND_REPORTS_ON_STAGING is false, warn that reports will be sent to the problem reporter, not whatever has been set up in the admin. Fixes #982.
-rw-r--r--templates/web/base/admin/bodies.html7
-rw-r--r--templates/web/base/admin/body.html4
2 files changed, 11 insertions, 0 deletions
diff --git a/templates/web/base/admin/bodies.html b/templates/web/base/admin/bodies.html
index ad0594146..a039f8208 100644
--- a/templates/web/base/admin/bodies.html
+++ b/templates/web/base/admin/bodies.html
@@ -9,6 +9,13 @@
contacts (such as an email address) to which reports are sent.') %]
</p>
[% ELSE %]
+
+ [% IF c.config.STAGING_SITE and !c.config.SEND_REPORTS_ON_STAGING %]
+ <p class="fms-admin-warning">
+ [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='http://fixmystreet.org/customising/config/#send_reports_on_staging'><code>SEND_REPORTS_ON_STAGING</code></a>") %]
+ </p>
+ [% END %]
+
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('Name') %]</th>
diff --git a/templates/web/base/admin/body.html b/templates/web/base/admin/body.html
index 1e3a8f824..cd87a5af8 100644
--- a/templates/web/base/admin/body.html
+++ b/templates/web/base/admin/body.html
@@ -47,6 +47,10 @@
<br>
[% loc("Add a contact using the form below.") %]
</p>
+[% ELSIF c.config.STAGING_SITE and !c.config.SEND_REPORTS_ON_STAGING %]
+ <p class="fms-admin-warning">
+ [% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='http://fixmystreet.org/customising/config/#send_reports_on_staging'><code>SEND_REPORTS_ON_STAGING</code></a>") %]
+ </p>
[% END %]
<form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">