function apply_for_role_block_configure in Apply for role 7.2
Implements hook_block_configure
Purpose: Creating option on block to allow disabling it if no roles are available.
File
- ./
apply_for_role.module, line 904 - Allows users to apply for roles.
Code
function apply_for_role_block_configure($delta) {
// Check that we are dealing with the apply for role block.
if ($delta == 'apply_for_role') {
// Initialize form array.
$form = array();
// Create check box for hiding block if no roles available.
$form['apply_for_role_hide_block_no_roles'] = array(
'#type' => 'checkbox',
'#title' => t('Do not display block if there are no roles available'),
'#default_value' => variable_get('apply_for_role_hide_block_no_roles', 0),
);
return $form;
}
}