summaryrefslogtreecommitdiffstats
path: root/template/en/default/list
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/list
parentfd518e1e24aa4b1164634ef5c432621f2c6bbb64 (diff)
downloadbugzilla-cf74a17e34f66ecdeb092f7b020bed95821a2492.tar.gz
bugzilla-cf74a17e34f66ecdeb092f7b020bed95821a2492.tar.xz
Bug 978070: Do not use document.write() to insert HTML code
r/a=justdave
Diffstat (limited to 'template/en/default/list')
-rw-r--r--template/en/default/list/edit-multiple.html.tmpl9
-rw-r--r--template/en/default/list/quips.html.tmpl21
2 files changed, 20 insertions, 10 deletions
diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl
index 80204a613..2282d69f4 100644
--- a/template/en/default/list/edit-multiple.html.tmpl
+++ b/template/en/default/list/edit-multiple.html.tmpl
@@ -10,6 +10,11 @@
<input type="hidden" name="dontchange" value="[% dontchange FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]">
+<input type="button" id="uncheck_all" value="Uncheck All"
+ class="bz_default_hidden" onclick="SetCheckboxes(false);">
+<input type="button" id="check_all" value="Check All"
+ class="bz_default_hidden" onclick="SetCheckboxes(true);">
+
<script type="text/javascript">
function SetCheckboxes(value) {
var elements = document.forms.changeform.getElementsByTagName('input'),
@@ -22,8 +27,8 @@
}
}
}
- document.write(' <input type="button" name="uncheck_all" value="Uncheck All" onclick="SetCheckboxes(false);">');
- document.write(' <input type="button" name="check_all" value="Check All" onclick="SetCheckboxes(true);">');
+ YAHOO.util.Dom.removeClass("check_all", "bz_default_hidden");
+ YAHOO.util.Dom.removeClass("uncheck_all", "bz_default_hidden");
</script>
<hr>
diff --git a/template/en/default/list/quips.html.tmpl b/template/en/default/list/quips.html.tmpl
index 8fb89af7c..e928cf0c5 100644
--- a/template/en/default/list/quips.html.tmpl
+++ b/template/en/default/list/quips.html.tmpl
@@ -107,7 +107,15 @@
[% END %]
</tbody>
</table>
- <script type="text/javascript"><!--
+
+ <input type="button" id="uncheck_all" value="Uncheck All"
+ class="bz_default_hidden" onclick="SetCheckboxes(false);">
+ <input type="button" id="check_all" value="Check All"
+ class="bz_default_hidden" onclick="SetCheckboxes(true);">
+ <input type="submit" id="update" value="Save Changes">
+
+ <script type="text/javascript">
+ <!--
var numelements = document.forms.editform.elements.length;
function SetCheckboxes(value) {
var item;
@@ -116,13 +124,10 @@
item.checked = value;
}
}
- document.write(' <input type="button" name="uncheck_all" '
- +'value="Uncheck All" onclick="SetCheckboxes(false);">');
- document.write(' <input type="button" name="check_all" '
- +'value="Check All" onclick="SetCheckboxes(true);">');
- //--></script>
-
- <input type="submit" id="update" value="Save Changes">
+ YAHOO.util.Dom.removeClass("check_all", "bz_default_hidden");
+ YAHOO.util.Dom.removeClass("uncheck_all", "bz_default_hidden");
+ //-->
+ </script>
</form>
<br>
[% END %]