diff options
Diffstat (limited to 'template')
-rw-r--r-- | template/en/default/list/edit-multiple.html.tmpl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index fa8d3d1ae..05d534976 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -28,12 +28,15 @@ <input type="hidden" name="token" value="[% token FILTER html %]"> <script type="text/javascript"> - var numelements = document.forms.changeform.elements.length; function SetCheckboxes(value) { - var item; - for (var i=0 ; i<numelements ; i++) { - item = document.forms.changeform.elements[i]; - item.checked = value; + var elements = document.forms.changeform.getElementsByTagName('input'), + numelements = elements.length, + item, i; + for (i = 0; i < numelements; i++) { + item = elements[i]; + if (item.type === 'checkbox' && item.name.match(/^id_/)) { + item.checked = value; + } } } document.write(' <input type="button" name="uncheck_all" value="Uncheck All" onclick="SetCheckboxes(false);">'); |