>From 51af5527ed411a47dc89bf6985e3a4a1a2d876af Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Tue, 21 Feb 2017 09:33:51 -0600
Subject: [PATCH] Added access banner to TKS UI.

All pages in TKS 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/tks/shared/webapps/tks/404.html                          | 10 +++++++---
 base/tks/shared/webapps/tks/500.html                          | 10 +++++++---
 base/tks/shared/webapps/tks/GenUnexpectedError.template       |  9 ++++++++-
 base/tks/shared/webapps/tks/agent/GenError.template           |  9 ++++++++-
 base/tks/shared/webapps/tks/agent/GenPending.template         |  9 ++++++++-
 base/tks/shared/webapps/tks/agent/GenRejected.template        |  9 ++++++++-
 base/tks/shared/webapps/tks/agent/GenSuccess.template         |  9 ++++++++-
 base/tks/shared/webapps/tks/agent/GenSvcPending.template      |  9 ++++++++-
 base/tks/shared/webapps/tks/agent/GenUnauthorized.template    |  9 ++++++++-
 base/tks/shared/webapps/tks/agent/GenUnexpectedError.template |  9 ++++++++-
 base/tks/shared/webapps/tks/agent/header.template             |  8 ++++++--
 base/tks/shared/webapps/tks/agent/index.jsp                   |  8 ++++++++
 base/tks/shared/webapps/tks/agent/index.template              |  8 ++++++--
 base/tks/shared/webapps/tks/agent/ports.template              |  8 ++++++--
 base/tks/shared/webapps/tks/agent/tks/getStats.template       |  6 ++++++
 base/tks/shared/webapps/tks/agent/tks/index.jsp               |  6 ++++++
 base/tks/shared/webapps/tks/index.jsp                         |  8 ++++++++
 base/tks/shared/webapps/tks/services.template                 |  8 ++++++--
 18 files changed, 130 insertions(+), 22 deletions(-)

diff --git a/base/tks/shared/webapps/tks/404.html b/base/tks/shared/webapps/tks/404.html
index 6180983028e74969c1defa1e648ee4a23a2fa2aa..a050b9942ced022cb3441642555756131b6b2cad 100755
--- a/base/tks/shared/webapps/tks/404.html
+++ b/base/tks/shared/webapps/tks/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,9 +25,12 @@ var hostname = location.hostname;
 var port = location.port;
 </script>
 
-<head>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
+<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>
 
 <script type="text/javascript" language="JavaScript">
 $(function() {
diff --git a/base/tks/shared/webapps/tks/500.html b/base/tks/shared/webapps/tks/500.html
index 032cb0dd4162f773e7caee63280f14146a27f41a..7cbd1b35db3051dfb8f3a1d0b3f257b2b2091e86 100755
--- a/base/tks/shared/webapps/tks/500.html
+++ b/base/tks/shared/webapps/tks/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,9 +25,12 @@ var hostname = location.hostname;
 var port = location.port;
 </script>
 
-<head>
-+<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
-+<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
+<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>
 
 <script type="text/javascript" language="JavaScript">
 $(function() {
diff --git a/base/tks/shared/webapps/tks/GenUnexpectedError.template b/base/tks/shared/webapps/tks/GenUnexpectedError.template
index af0683fa073b22f948c24b5b4b2ef8ac66f35c87..7111a366f2adfe4049914ccccc57af851c9dd1e3 100644
--- a/base/tks/shared/webapps/tks/GenUnexpectedError.template
+++ b/base/tks/shared/webapps/tks/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>TKS 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/tks/shared/webapps/tks/agent/GenError.template b/base/tks/shared/webapps/tks/agent/GenError.template
index 0db5d1d22a100d400dc46b854049981f4a51fada..06ec857c9a3dc26bb9ca2ce7d13dea78316c97f0 100644
--- a/base/tks/shared/webapps/tks/agent/GenError.template
+++ b/base/tks/shared/webapps/tks/agent/GenError.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>TKS Agent 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/tks/shared/webapps/tks/agent/GenPending.template b/base/tks/shared/webapps/tks/agent/GenPending.template
index a75a5ebdc3b966c824d376b4f17df78261ad1832..830f941b99bc01a775822d08811227d3a95c54ba 100644
--- a/base/tks/shared/webapps/tks/agent/GenPending.template
+++ b/base/tks/shared/webapps/tks/agent/GenPending.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>TKS Agent Request Pending</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">
 
 
diff --git a/base/tks/shared/webapps/tks/agent/GenRejected.template b/base/tks/shared/webapps/tks/agent/GenRejected.template
index 112717a7e4059c2d191dae53feff5d5c13ef95f6..d179ee7c16e3935eda98aebc1cc47e6b5c58da13 100644
--- a/base/tks/shared/webapps/tks/agent/GenRejected.template
+++ b/base/tks/shared/webapps/tks/agent/GenRejected.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>TKS Agent Request Rejected</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/tks/shared/webapps/tks/agent/GenSuccess.template b/base/tks/shared/webapps/tks/agent/GenSuccess.template
index 02a9b9b8badc8720b2fdcb1fe927742ae8f7bc9d..11981565403dec80a60472ed83fdee93865972fb 100644
--- a/base/tks/shared/webapps/tks/agent/GenSuccess.template
+++ b/base/tks/shared/webapps/tks/agent/GenSuccess.template
@@ -17,11 +17,18 @@
      --- END COPYRIGHT BLOCK --- -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <HTML>
+<head>
 <!-- This template is intended to be replaced by request specific results !  -->
 <CMS_TEMPLATE>
 
 <TITLE>TKS Agent Generic Request Success</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/tks/shared/webapps/tks/agent/GenSvcPending.template b/base/tks/shared/webapps/tks/agent/GenSvcPending.template
index cb36a58819b36e218b8a029618ff60a24398f962..c33867226efc3ea5a1ea06af949cf8d8f6951790 100644
--- a/base/tks/shared/webapps/tks/agent/GenSvcPending.template
+++ b/base/tks/shared/webapps/tks/agent/GenSvcPending.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>TKS Agent Request Svc Pending</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/tks/shared/webapps/tks/agent/GenUnauthorized.template b/base/tks/shared/webapps/tks/agent/GenUnauthorized.template
index c6e62f841d40dbaacd72e3bece8fd05cdba42701..c671f342ebdd17340ab2befe6a59fb5c2b157187 100644
--- a/base/tks/shared/webapps/tks/agent/GenUnauthorized.template
+++ b/base/tks/shared/webapps/tks/agent/GenUnauthorized.template
@@ -17,11 +17,18 @@
      --- END COPYRIGHT BLOCK --- -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <HTML>
+<head>
 <!-- This template is intended to be replaced by request specific results !  -->
 <CMS_TEMPLATE>
 
 <TITLE>TKS Agent Generic Unauthorized</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/tks/shared/webapps/tks/agent/GenUnexpectedError.template b/base/tks/shared/webapps/tks/agent/GenUnexpectedError.template
index 4047cd6161f9dc6afa6664d5417b859793f3a143..38b3cff1888514019d0715a1038995d799cf09b5 100644
--- a/base/tks/shared/webapps/tks/agent/GenUnexpectedError.template
+++ b/base/tks/shared/webapps/tks/agent/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>TKS Agent 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/tks/shared/webapps/tks/agent/header.template b/base/tks/shared/webapps/tks/agent/header.template
index 0b442c0a78969d144017fd013de31683274e9908..0bd25911459dda51fb13182308c8f8adc949e9df 100644
--- a/base/tks/shared/webapps/tks/agent/header.template
+++ b/base/tks/shared/webapps/tks/agent/header.template
@@ -18,8 +18,12 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
+<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>
 
 <script type="text/javascript" language="JavaScript">
 $(function() {
diff --git a/base/tks/shared/webapps/tks/agent/index.jsp b/base/tks/shared/webapps/tks/agent/index.jsp
index 30662d47aa6a0c3f7aafc03acf16b02cf2ac93bf..eae2da3c25ffaac82c434a5ef5137d9c3d635138 100644
--- a/base/tks/shared/webapps/tks/agent/index.jsp
+++ b/base/tks/shared/webapps/tks/agent/index.jsp
@@ -16,8 +16,16 @@
      All rights reserved.
      --- END COPYRIGHT BLOCK --- -->
 <html>
+<head>
+<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>
 <script lang="javascript">
     // redirect to 'ROOT'
     window.location = "/";
 </script>
+</head>
 </html>
diff --git a/base/tks/shared/webapps/tks/agent/index.template b/base/tks/shared/webapps/tks/agent/index.template
index ae9cc52d67ed60951249f1004629eedf6ceaabcf..789c067f214483f401d07912f5e0177067f16d4e 100644
--- a/base/tks/shared/webapps/tks/agent/index.template
+++ b/base/tks/shared/webapps/tks/agent/index.template
@@ -18,8 +18,12 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
+<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>
 
 <script type="text/javascript" language="JavaScript">
 $(function() {
diff --git a/base/tks/shared/webapps/tks/agent/ports.template b/base/tks/shared/webapps/tks/agent/ports.template
index e321a8aec3e89853c5691bb245899c900ba51a84..03723e0e3bc20172fa77d465d9402b21c28ac66d 100644
--- a/base/tks/shared/webapps/tks/agent/ports.template
+++ b/base/tks/shared/webapps/tks/agent/ports.template
@@ -18,8 +18,12 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
+<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>
 
 <script type="text/javascript" language="JavaScript">
 $(function() {
diff --git a/base/tks/shared/webapps/tks/agent/tks/getStats.template b/base/tks/shared/webapps/tks/agent/tks/getStats.template
index 59ae3e6d37ba0e1ca6ad50412bb9a7794e0d47e1..86aafc04a333c8d702d39539b479a5da838ef83f 100644
--- a/base/tks/shared/webapps/tks/agent/tks/getStats.template
+++ b/base/tks/shared/webapps/tks/agent/tks/getStats.template
@@ -20,6 +20,12 @@
 <head>
    <title>Display CRL</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<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>
 <SCRIPT LANGUAGE="JavaScript"></SCRIPT>
 <SCRIPT LANGUAGE="JavaScript" SRC="../helpfun.js"></SCRIPT>
 <SCRIPT LANGUAGE="JavaScript">
diff --git a/base/tks/shared/webapps/tks/agent/tks/index.jsp b/base/tks/shared/webapps/tks/agent/tks/index.jsp
index e9e0252228b7f5a10661d26c770322548ccafb0d..d4230552197f9acf65650bfa0a0fa5f9358c2f25 100644
--- a/base/tks/shared/webapps/tks/agent/tks/index.jsp
+++ b/base/tks/shared/webapps/tks/agent/tks/index.jsp
@@ -22,6 +22,12 @@
  content="text/html; charset=ISO-8859-1">
   <link rel="shortcut icon" href="/pki/images/favicon.ico" />
   <title>TKS Agent</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>
 <div style="text-align: center;"><big><big><big><big><span
diff --git a/base/tks/shared/webapps/tks/index.jsp b/base/tks/shared/webapps/tks/index.jsp
index a113243524acb38cbad73b1d80fc2d6996301150..92d618eebad33c8a4aebed0beb0435d723432bab 100644
--- a/base/tks/shared/webapps/tks/index.jsp
+++ b/base/tks/shared/webapps/tks/index.jsp
@@ -16,7 +16,15 @@
      All rights reserved.
      --- END COPYRIGHT BLOCK --- -->
 <html>
+<head>
+<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>
 <script lang="javascript">
     window.location = '/tks/services';
 </script>
+</head>
 </html>
diff --git a/base/tks/shared/webapps/tks/services.template b/base/tks/shared/webapps/tks/services.template
index d3f598cb64b00dceddfb90b28562af93f7001118..46689aa97e9e7d6fa9a3ef82c3b786d0f63b8b15 100644
--- a/base/tks/shared/webapps/tks/services.template
+++ b/base/tks/shared/webapps/tks/services.template
@@ -18,8 +18,12 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
-<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
+<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>
 
 <script type="text/javascript" language="JavaScript">
 $(function() {
-- 
2.9.3

