added (un)checkall links to the "Global privileges" edition form

This commit is contained in:
Olivier Müller
2004-04-03 00:29:59 +00:00
parent 3eb019f25a
commit c56cf7cf47
3 changed files with 16 additions and 5 deletions

View File

@@ -69,7 +69,9 @@ function checkAddUser(the_form)
*/
function setCheckboxes(the_form, the_checkboxes, do_check)
{
var elts = document.forms[the_form].elements[the_checkboxes + '[]'];
var elts = (the_checkboxes != '')
? document.forms[the_form].elements[the_checkboxes + '[]']
: document.forms[the_form].elements;
var elts_cnt = (typeof(elts.length) != 'undefined')
? elts.length
: 0;
@@ -83,4 +85,4 @@ function setCheckboxes(the_form, the_checkboxes, do_check)
} // end if... else
return true;
} // end of the 'setCheckboxes()' function
} // end of the 'setCheckboxes()' function