From 5d4c7be61ea01280fa618ca421dbee5b9e97f56a Mon Sep 17 00:00:00 2001
From: Matthew Somerville
Date: Tue, 20 Jan 2015 12:51:42 +0000
Subject: 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.
---
templates/web/base/admin/bodies.html | 7 +++++++
templates/web/base/admin/body.html | 4 ++++
2 files changed, 11 insertions(+)
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.') %]
[% ELSE %]
+
+ [% IF c.config.STAGING_SITE and !c.config.SEND_REPORTS_ON_STAGING %]
+
+ [% 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."), "SEND_REPORTS_ON_STAGING") %]
+
+ [% END %]
+
| [% loc('Name') %] |
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 @@
[% loc("Add a contact using the form below.") %]
+[% ELSIF c.config.STAGING_SITE and !c.config.SEND_REPORTS_ON_STAGING %]
+
+ [% 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."), "SEND_REPORTS_ON_STAGING") %]
+
[% END %]