All pages in TPS UI have been modified to retrieve access banner
and display it once at the beginning of the SSL connection.

https://fedorahosted.org/pki/ticket/2582

--
Endi S. Dewata
>From 31651b18fc06234db91478069374c4a2b01a79c9 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edew...@redhat.com>
Date: Tue, 21 Feb 2017 09:34:20 -0600
Subject: [PATCH] Added access banner to TPS UI.

All pages in TPS UI have been modified to retrieve access banner
and display it once at the beginning of the SSL connection.

https://fedorahosted.org/pki/ticket/2582
---
 base/tps/shared/webapps/tps/404.html                    | 9 ++++++++-
 base/tps/shared/webapps/tps/500.html                    | 9 ++++++++-
 base/tps/shared/webapps/tps/GenUnexpectedError.template | 9 ++++++++-
 base/tps/shared/webapps/tps/index.jsp                   | 5 +++++
 base/tps/shared/webapps/tps/ui/index.jsp                | 1 +
 5 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/base/tps/shared/webapps/tps/404.html b/base/tps/shared/webapps/tps/404.html
index dc78f60d228107e7874611762001cc9ea6fe4cae..0aaf29cdf530b389c35194d1b37ca9d84eaca9bc 100755
--- a/base/tps/shared/webapps/tps/404.html
+++ b/base/tps/shared/webapps/tps/404.html
@@ -17,6 +17,7 @@
      --- END COPYRIGHT BLOCK --- -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
+<head>
 <script language=javascript>
 var url = document.URL;
 var protocol = location.protocol;
@@ -24,8 +25,14 @@ var hostname = location.hostname;
 var port = location.port;
 </script>
 
-<head>
 <title>TPS 404 Error!</title>
+<script src="/pki/js/jquery.js"></script>
+<script src="/pki/js/jquery.i18n.properties.js"></script>
+<script src="/pki/js/underscore.js"></script>
+<script src="/pki/js/backbone.js"></script>
+<script src="/pki/js/pki.js"></script>
+<script src="/pki/js/pki-banner.js"></script>
+
 <!-- always expand ALL relative paths -->
 <script language=javascript>
 document.write('<link rel="shortcut icon" href="');
diff --git a/base/tps/shared/webapps/tps/500.html b/base/tps/shared/webapps/tps/500.html
index 9cd22f36a7453c95279238ff9221ee0e7520f1cf..9e74fb118cd34b5969792a4304fc3376a53063e6 100755
--- a/base/tps/shared/webapps/tps/500.html
+++ b/base/tps/shared/webapps/tps/500.html
@@ -17,6 +17,7 @@
      --- END COPYRIGHT BLOCK --- -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
+<head>
 <script language=javascript>
 var url = document.URL;
 var protocol = location.protocol;
@@ -24,8 +25,14 @@ var hostname = location.hostname;
 var port = location.port;
 </script>
 
-<head>
 <title>TPS 500 Error!</title>
+<script src="/pki/js/jquery.js"></script>
+<script src="/pki/js/jquery.i18n.properties.js"></script>
+<script src="/pki/js/underscore.js"></script>
+<script src="/pki/js/backbone.js"></script>
+<script src="/pki/js/pki.js"></script>
+<script src="/pki/js/pki-banner.js"></script>
+
 <!-- always expand ALL relative paths -->
 <script language=javascript>
 document.write('<link rel="shortcut icon" href="');
diff --git a/base/tps/shared/webapps/tps/GenUnexpectedError.template b/base/tps/shared/webapps/tps/GenUnexpectedError.template
index ea545c1457e0d1aa07199786222f67ee1ffbf400..405070b718fb7308d191840ccb472475f407ef80 100644
--- a/base/tps/shared/webapps/tps/GenUnexpectedError.template
+++ b/base/tps/shared/webapps/tps/GenUnexpectedError.template
@@ -17,10 +17,17 @@
      --- END COPYRIGHT BLOCK --- -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
 <HTML>
+<head>
 <CMS_TEMPLATE>
 
 <TITLE>TPS Processing Error!</TITLE>
-
+<script src="/pki/js/jquery.js"></script>
+<script src="/pki/js/jquery.i18n.properties.js"></script>
+<script src="/pki/js/underscore.js"></script>
+<script src="/pki/js/backbone.js"></script>
+<script src="/pki/js/pki.js"></script>
+<script src="/pki/js/pki-banner.js"></script>
+</head>
 <BODY BGCOLOR="white">
 
 <font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
diff --git a/base/tps/shared/webapps/tps/index.jsp b/base/tps/shared/webapps/tps/index.jsp
index ad4f75ec12b68724762f684cc44e191e6cb54865..3c9abf8160b4427996a16dc6aa81dc26573d7828 100644
--- a/base/tps/shared/webapps/tps/index.jsp
+++ b/base/tps/shared/webapps/tps/index.jsp
@@ -21,7 +21,12 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <link href="/pki/css/patternfly.css" rel="stylesheet" media="screen, print">
     <script src="/pki/js/jquery.js"></script>
+    <script src="/pki/js/jquery.i18n.properties.js"></script>
+    <script src="/pki/js/underscore.js"></script>
+    <script src="/pki/js/backbone.js"></script>
     <script src="/pki/js/bootstrap.js"></script>
+    <script src="/pki/js/pki.js"></script>
+    <script src="/pki/js/pki-banner.js"></script>
     <script src="/tps/js/account.js"></script>
     <script>
 $(function() {
diff --git a/base/tps/shared/webapps/tps/ui/index.jsp b/base/tps/shared/webapps/tps/ui/index.jsp
index bae74ce8fcee7db8d8dda6fb3c17b760cc0c99d5..165a0284cfec74cdfdc761db57e29030043e2ca7 100644
--- a/base/tps/shared/webapps/tps/ui/index.jsp
+++ b/base/tps/shared/webapps/tps/ui/index.jsp
@@ -28,6 +28,7 @@
     <script src="/pki/js/patternfly.js"></script>
     <script src="/pki/js/pki.js"></script>
     <script src="/pki/js/pki-ui.js"></script>
+    <script src="/pki/js/pki-banner.js"></script>
     <script src="/tps/js/tps.js"></script>
     <script src="/tps/js/account.js"></script>
     <script src="/tps/js/activity.js"></script>
-- 
2.9.3

_______________________________________________
Pki-devel mailing list
Pki-devel@redhat.com
https://www.redhat.com/mailman/listinfo/pki-devel

Reply via email to