function signup_cancel_multiple_confirm in Signup 6.2
Same name and namespace in other branches
- 5.2 signup.module \signup_cancel_multiple_confirm()
Builds the confirm form when canceling multiple signups from node/N/signups.
1 string reference to 'signup_cancel_multiple_confirm'
- signup_menu in ./
signup.module - Implementation of hook_menu().
File
- includes/
node_admin.inc, line 174 - Code related to the signup administration tab on each node.
Code
function signup_cancel_multiple_confirm(&$form_state, $node) {
$form = array();
$form['nid'] = array(
'#type' => 'hidden',
'#value' => $node->nid,
);
$form['users'] = array(
'#prefix' => '<ul>',
'#suffix' => '</ul>',
'#tree' => TRUE,
);
$placeholders = db_placeholders($_SESSION['signup_cancel_multiple_users']);
$query = db_query("SELECT u.name, u.uid, s.* FROM {signup_log} s INNER JOIN {users} u ON s.uid = u.uid WHERE s.sid IN (" . $placeholders . ")", $_SESSION['signup_cancel_multiple_users']);
while ($signup = db_fetch_object($query)) {
$key = $signup->sid;
if ($signup->uid) {
$label = theme('username', $signup);
}
else {
$label = t('Anonymous signup: %anon_mail', array(
'%anon_mail' => $signup->anon_mail,
));
}
$form['users'][$key] = array(
'#type' => 'hidden',
'#value' => $key,
'#prefix' => '<li>',
'#suffix' => $label . "</li>\n",
);
}
$form['#submit'][] = 'signup_cancel_multiple_confirm_submit';
return confirm_form($form, t('Are you sure you want to cancel signups for these users?'), 'node/' . $node->nid . '/signups', t('This action cannot be undone.'), t('Cancel signups'), t('Keep signups'));
}