function group_multiple_delete_confirm in Group 7
Multiple group deletion confirmation form.
2 string references to 'group_multiple_delete_confirm'
- group_group_operations in ./
group.group.inc - Implements hook_group_operations().
- hook_group_operations in ./
group.api.php - Add mass group operations.
File
- admin/
group.inc, line 304 - Group overview admin UI.
Code
function group_multiple_delete_confirm($form, &$form_state, $gids) {
$form['#submit'][] = 'group_multiple_delete_confirm_submit';
$form['groups'] = array(
'#prefix' => '<ul>',
'#suffix' => '</ul>',
'#tree' => TRUE,
);
foreach ($gids as $gid) {
$title = db_query('SELECT title FROM {groups} WHERE gid = :gid', array(
':gid' => $gid,
))
->fetchField();
$form['groups'][$gid] = array(
'#type' => 'hidden',
'#value' => $gid,
'#prefix' => '<li>',
'#suffix' => check_plain($title) . "</li>\n",
);
}
$form['info'] = array(
'#markup' => t('By deleting a group you will delete all of its subgroups and content as well.'),
'#suffix' => '<br />',
);
$question = format_plural(count($gids), 'Are you sure you want to delete this group?', 'Are you sure you want to delete these groups?');
return confirm_form($form, $question, 'admin/group', NULL, t('Delete'));
}