Quote:
Originally Posted by Cyricx
This works like a charm Marcoh!
Any idea how to do the check box that turns them all on or all off like the primary group has?
Thanks so much man!
|
In you includes/adminfunctions_user.php, find:
PHP Code:
// Start hack MarcoH64
print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroupids]', 2, $userarray);
// End hack MarcoH64
Replace by:
PHP Code:
// Start hack MarcoH64
?>
<script type="text/javascript">
function check_all_additional_usergroups(formobj, toggle_status)
{
for (var i = 0; i < formobj.elements.length; i++)
{
var elm = formobj.elements[i];
if (elm.type == "checkbox" && elm.name == 'user[membergroupids][]')
{
elm.checked = toggle_status;
}
}
}
</script>
<?php
print_checkbox_row($vbphrase['all_usergroups'] . " (Additional)", 'usergroup_additional_all', 0, -1, $vbphrase['all_usergroups'] . " (Additional)", 'check_all_additional_usergroups(this.form, this.checked);');
print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroupids]', 2, $userarray);
// End hack MarcoH64
Again please test on a testboard first.