function notifications_form_unsubscribe_confirm in Notifications 6.3
Same name and namespace in other branches
- 5 notifications.admin.inc \notifications_form_unsubscribe_confirm()
- 6.4 notifications.pages.inc \notifications_form_unsubscribe_confirm()
- 6 notifications.pages.inc \notifications_form_unsubscribe_confirm()
- 6.2 notifications.pages.inc \notifications_form_unsubscribe_confirm()
Form for unsubscription confirmation
It works for both single subscription or account (all subscriptions)
1 string reference to 'notifications_form_unsubscribe_confirm'
- notifications_page_unsubscribe in ./
notifications.pages.inc - Menu callback for unsubscribe page
File
- ./
notifications.pages.inc, line 330 - 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'] = notifications_subscription_info_field($subscription);
}
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'));
}