aboutsummaryrefslogtreecommitdiffstats
path: root/template/en/default/bug/create
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2014-03-26 20:10:07 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2014-03-26 20:10:07 +0100
commitcf74a17e34f66ecdeb092f7b020bed95821a2492 (patch)
tree0b188f062dd96107ee6cc75ba4570a5ef44bea96 /template/en/default/bug/create
parentfd518e1e24aa4b1164634ef5c432621f2c6bbb64 (diff)
downloadbugs-cf74a17e34f66ecdeb092f7b020bed95821a2492.tar
bugs-cf74a17e34f66ecdeb092f7b020bed95821a2492.tar.gz
bugs-cf74a17e34f66ecdeb092f7b020bed95821a2492.tar.bz2
bugs-cf74a17e34f66ecdeb092f7b020bed95821a2492.tar.xz
bugs-cf74a17e34f66ecdeb092f7b020bed95821a2492.zip
Bug 978070: Do not use document.write() to insert HTML code
r/a=justdave
Diffstat (limited to 'template/en/default/bug/create')
-rw-r--r--template/en/default/bug/create/create-guided.html.tmpl21
1 files changed, 8 insertions, 13 deletions
diff --git a/template/en/default/bug/create/create-guided.html.tmpl b/template/en/default/bug/create/create-guided.html.tmpl
index 5cc9df64f..4c087c637 100644
--- a/template/en/default/bug/create/create-guided.html.tmpl
+++ b/template/en/default/bug/create/create-guided.html.tmpl
@@ -29,13 +29,12 @@ var descriptions = [
];
function PutDescription() {
- if ((document.getElementById) && (document.body.innerHTML)) {
- var componentIndex = document.getElementById('component').selectedIndex;
- if (componentIndex != -1) {
- var description = document.getElementById('description');
- description.innerHTML = descriptions[componentIndex];
- }
- }
+ var description = document.getElementById('description');
+ var componentIndex = document.getElementById('component').selectedIndex;
+ YAHOO.util.Dom.removeClass("description", "bz_default_hidden");
+ if (componentIndex != -1) {
+ description.innerHTML = descriptions[componentIndex];
+ }
}
</script>
@@ -130,12 +129,8 @@ function PutDescription() {
[% END %]
</select>
- <div id="description" class="comment">
- <script type="text/javascript">
- if ((document.getElementById) && (document.body.innerHTML)) {
- document.write("Select a component to see its description here.");
- }
- </script>
+ <div id="description" class="comment bz_default_hidden">
+ Select a component to see its description here.
</div>
<p>