function notifications_subscription_base_form_submit in Notifications 7
Same name and namespace in other branches
- 6.4 notifications.pages.inc \notifications_subscription_base_form_submit()
Save edited subscription
1 call to notifications_subscription_base_form_submit()
- notifications_subscription_user_form_submit in notifications_account/
notifications_account.module - Main subscriptions form submit
File
- ./
notifications.pages.inc, line 315 - User pages for Notifications
Code
function notifications_subscription_base_form_submit($form, &$form_state) {
$subscription = Notifications_Subscription::build_submission($form_state);
switch ($form_state['values']['op']) {
case t('Save'):
case t('Subscribe'):
case t('Create subscription'):
// We are updating or creating a new subscription
notifications_submit_subscription($subscription);
break;
case t('Delete'):
Notifications_Subscription::delete_subscription($subscription->sid);
drupal_set_message(t('Your subscription has been deleted.'));
$form_state['redirect'] = 'user/' . $subscription->uid . '/notifications';
break;
}
}