function notifications_form_unsubscribe_confirm in Notifications 6.4
Same name and namespace in other branches
- 5 notifications.admin.inc \notifications_form_unsubscribe_confirm()
- 6 notifications.pages.inc \notifications_form_unsubscribe_confirm()
- 6.2 notifications.pages.inc \notifications_form_unsubscribe_confirm()
- 6.3 notifications.pages.inc \notifications_form_unsubscribe_confirm()
Form for unsubscription confirmation
It works for both single subscription or account (all subscriptions)
3 string references to 'notifications_form_unsubscribe_confirm'
- notifications_anonymous_subscription_page in notifications_anonymous/
notifications_anonymous.pages.inc - Page callback. Manage anonymous subscriptions.
- notifications_menu in ./
notifications.module - Implementation of hook_menu().
- notifications_page_unsubscribe in ./
notifications.pages.inc - Menu callback for unsubscribe page
File
- ./
notifications.pages.inc, line 253 - User pages for Notifications
Code
function notifications_form_unsubscribe_confirm($form_state, $subscription, $account = NULL) {
// Pass on subscription values
$form['subscription'] = array(
'#type' => 'value',
'#value' => $subscription,
);
$form['account'] = array(
'#type' => 'value',
'#value' => $account,
);
if ($subscription) {
$message = t('Are you sure you want to delete this subscription?');
// The subscription description will be added here
$form['info'] = $subscription
->form_info();
}
else {
$message = t('Are you sure you want to remove all your subscriptions on this site?');
}
return confirm_form($form, $message, isset($_GET['destination']) ? $_GET['destination'] : '', t('This action cannot be undone.'), t('Unsubscribe'), t('Cancel'));
}