function invite_withdraw_form in Invite 7.4
Menu callback; display confirm form to withdraw an invitation.
_state
Parameters
$form:
Invite $invite: Invite object.
Return value
array
1 string reference to 'invite_withdraw_form'
- invite_menu in ./
invite.module - Implements hook_menu().
File
- includes/
invite.pages.inc, line 125
Code
function invite_withdraw_form($form, &$form_state, $invite) {
global $user;
$form['invite'] = array(
'#type' => 'value',
'#value' => $invite,
);
$invite_render_tree = entity_view('invite', array(
entity_id('invite', $invite) => $invite,
), 'full');
$description = !$invite->joined && $invite->expiry > REQUEST_TIME ? t('The invitee will no longer be able to register using this invitation !invite<br/>', array(
'!invite' => drupal_render($invite_render_tree),
)) : '';
$redirect = !empty($_REQUEST['destination']) ? $_REQUEST['destination'] : '<front>';
return confirm_form($form, t('Are you sure you want to withdraw the invitation?'), $redirect, $description . t('This action cannot be undone.'), t('Withdraw'), t('Cancel'));
}