Header changes to disable RT javascript, RT#34237
authorIvan Kohler <ivan@freeside.biz>
Fri, 10 Jul 2015 05:30:09 +0000 (22:30 -0700)
committerJonathan Prykop <jonathan@freeside.biz>
Wed, 3 Feb 2016 22:58:08 +0000 (16:58 -0600)
rt/share/html/Elements/Header

index 1f6035d..664da06 100755 (executable)
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /elements/header.html, {
-              'title' => $Title,
-              'head'  => $head,
-              'etc'   => $etc,
+              'title'     => $Title,
+              'head'      => $head,
+              'etc'       => $etc,
               #make space for RT menu for now# 'nobr'  => 1,
-              'nocss' => 1,
+              'nocss'     => 1,
+              'no_jquery' => $JavaScript,
           }
 &>
 <%INIT>
@@ -113,9 +114,11 @@ if ($JavaScript) {
     $head .= $m->scomp('HeaderJavascript', focus => $Focus, onload => $onload, RichText => $RichText );
 }
 
-my $stylesheet_plugin = "/NoAuth/css/$style/InHeader";
-if ($m->comp_exists($stylesheet_plugin) ) {
-    $head .= $m->scomp($stylesheet_plugin);
+if ($JavaScript) {
+    my $stylesheet_plugin = "/NoAuth/css/$style/InHeader";
+    if ($m->comp_exists($stylesheet_plugin) ) {
+        $head .= $m->scomp($stylesheet_plugin);
+    }
 }
 
 #<!-- Site CSS from theme editor -->