function og_node_delete_group_form in Organic groups 5
Same name and namespace in other branches
- 5.8 og.module \og_node_delete_group_form()
- 5.2 og.module \og_node_delete_group_form()
- 5.3 og.module \og_node_delete_group_form()
- 5.7 og.module \og_node_delete_group_form()
- 6.2 og.module \og_node_delete_group_form()
- 6 og.module \og_node_delete_group_form()
1 call to og_node_delete_group_form()
- og_form_alter in ./
og.module
File
- ./
og.module, line 1585
Code
function og_node_delete_group_form(&$form) {
$options[] = t('Do nothing.');
$options[] = t("Delete all group posts which don't also belong to another group.");
if (user_access('administer nodes')) {
$options[] = t('Move all group posts to the group listed below.');
}
$form['verb'] = array(
'#type' => 'radios',
'#title' => t('Group posts'),
'#options' => $options,
'#weight' => 0,
'#description' => t('In addition to deleting this group, you may choose how to disposition the posts within it.'),
);
if (user_access('administer nodes')) {
$options = og_all_groups_options();
unset($options[$form['nid']['#value']]);
$form['target'] = array(
'#type' => 'select',
'#title' => t('Target group'),
'#default_value' => 0,
'#options' => $options,
'#weight' => 0,
'#description' => t('If you chose <b>Move all group posts</b> above, specify a destination group.'),
);
}
// register a submit handler
$form['#submit']['og_node_delete_confirm_submit'] = array();
$form['actions']['submit']['#value'] = t('Delete group');
}