From fb9474aba2f6351c18ece595157f0596a405a702 Mon Sep 17 00:00:00 2001
From: Dick Visser <dick.visser@geant.org>
Date: Wed, 21 Nov 2018 13:35:17 +0100
Subject: [PATCH] Add preproduction banner to legacy header template. This uses
 the translations from the preprodwarning module, and can be removed in 2.0
 (together with legacy templates).

---
 templates/includes/header.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/templates/includes/header.php b/templates/includes/header.php
index c84dcb942..6ddad9279 100644
--- a/templates/includes/header.php
+++ b/templates/includes/header.php
@@ -206,3 +206,7 @@ if (!empty($this->data['htmlinject']['htmlContentPre'])) {
         echo $c;
     }
 }
+$config = \SimpleSAML\Configuration::getInstance();
+if(! $config->getBoolean('production', true)) {
+  echo '<div class="caution">' . $this->t('{preprodwarning:warning:warning}'). '</div>';
+}
-- 
GitLab