]> git.donarmstrong.com Git - debbugs.git/blobdiff - templates/en_US/cgi/bugreport.tx
Use a checkbox and CSS to show info messages instead of JavaScript
[debbugs.git] / templates / en_US / cgi / bugreport.tx
index 6e7fef4378fbc423de5285b2ed19d55c8174f320..eee77d6fd8edfaa28f47ba0e91f500ce58f57221 100644 (file)
@@ -1,20 +1,5 @@
 <: include "html/pre_title.tx" :>#<: $bug.id :> - <: $bug.subject :> - <: $config.project :> <: $config.bug :> report logs<: include "html/post_title.tx" :>
 <link rel="canonical" href="<: $bug.url :>">
-<script type="text/javascript">
-<!--
-function toggle_infmessages()
-{
-        allDivs=document.getElementsByTagName("div");
-        for (var i = 0 ; i < allDivs.length ; i++ )
-       {
-                if (allDivs[i].className == "infmessage")
-                {
-                        allDivs[i].style.display=(allDivs[i].style.display == 'none' | allDivs[i].style.display == '') ? 'block' : 'none';
-                }
-       }
-}
--->
-</script>
 </head>
 <body>
     <div class="debbugs_install"><: $config.project :> <: $config.bug :> report logs</div>
@@ -23,9 +8,9 @@ function toggle_infmessages()
     </h1>
 : if $bug.has_found or $bug.has_fixed {
     <div class="versiongraph">
-        <a href="<: $bug.version_url :>">
+        <a href="<: $bug.version_url("format","svg") :>">
             <img alt="version graph"
-                 src="<: $bug.version_url("width",2,"height",2) :>">
+                 src="<: $bug.version_url("format","svg","width",2,"height",2) :>">
         </a></div>
 : }
 <: include "cgi/bugreport_pkginfo.tx" :>
@@ -47,9 +32,8 @@ to this <: $config.bug :>.</span>
 </div>
 : }
 <: raw($log) :>
-<script>
- document.write("<span class=\"uselessmessages\"><a href=\"javascript:toggle_infmessages();\">Toggle useless messages</a></span>")
-</script>
+<input id="uselessmessages" type="checkbox">
+<label for="uselessmessages">Display info messages</label>
 <hr>
 <p class="msgreceived">Send a report that <a href="<: $config.cgi_domain :>/bugspam.cgi?bug=<: $bug_num :>">this bug log contains spam</a>.</p>
 <hr>