function og_approve_user_action_form in Organic groups 6
Same name and namespace in other branches
- 6.2 modules/og_actions/og_actions.module \og_approve_user_action_form()
Configuration form for Approve User action.
File
- modules/
og_actions/ og_actions.module, line 426
Code
function og_approve_user_action_form($context) {
$form = array();
if (!isset($context['group'])) {
$context['group'] = '';
}
$groups = og_all_groups_options();
if (count($groups)) {
$form['group'] = array(
'#type' => 'select',
'#title' => t('Group'),
'#options' => $groups,
'#description' => t('Select the group whose user subscription request should be approved.'),
'#default_value' => $context['group'],
'#required' => TRUE,
);
}
else {
drupal_set_message(t('Please <a href="!url">create</a> a group first.', array(
'!url' => url('admin/conten
t'),
)));
}
return $form;
}