function block_access_fieldset in Block Access 6.2
Same name and namespace in other branches
- 6 block_access.module \block_access_fieldset()
- 7 block_access.module \block_access_fieldset()
2 calls to block_access_fieldset()
File
- ./
block_access.module, line 362
Code
function block_access_fieldset(&$form, $role_options, $perm, $module, $delta = null) {
$default_role_options = block_access_get_roles($module, $perm, $delta);
$collapsed = empty($default_role_options) ? TRUE : FALSE;
$form['role_' . $perm . '_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Role specific ' . $perm . ' settings'),
'#collapsible' => TRUE,
'#collapsed' => $collapsed,
);
$form['role_' . $perm . '_settings'][$perm . '_roles'] = array(
'#type' => 'checkboxes',
'#title' => t('Set permission for specific roles'),
'#default_value' => $default_role_options,
'#options' => $role_options,
'#description' => t('Set this permission for the selected role(s). If no roles are set the option will be available to all.'),
);
}