Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

render_user_group_checkbox_select()

Description

Renders a list of user groups

Parameters

ColumnTypeDefaultDescription
$name string
$current array array Current selected values (eg. array(1, 3) for Admins and Super admins user groups selected)
$style string '' CSS styling that will apply to the outer container (ie. table element)

Return

void

Location

include/render_functions.php lines 1576 to 1595

Definition

 
function render_user_group_checkbox_select($name, array $current = array(), $style '')
    {
    
?>
    <table id=" echo escape($name); ?>" if('' !== $style) { ?>style=" echo $style?>" ?>>
        <tbody>
    
    
foreach(get_usergroups(true) as $group)
        {
        
?>
        <tr>
            <td><input id=" echo escape($name '_' $group['ref']); ?>" type="checkbox" name=" echo escape($name); ?>[]" value=" echo $group['ref']; ?>" if(in_array($group['ref'], $current)) { ?> checked ?> /></td>
            <td><label for=" echo escape($name '_' $group['ref']); ?>"> echo $group['name']; ?></label></td>
        </tr>
        
        
}
        
?>
        </tbody>
    </table>
    
    
}

This article was last updated 4th December 2024 08:35 Europe/London time based on the source file dated 3rd December 2024 11:55 Europe/London time.