function notifications_admin_subscriptions_settings in Notifications 7
Same name and namespace in other branches
- 6.4 notifications.admin.inc \notifications_admin_subscriptions_settings()
Subscription settings
1 string reference to 'notifications_admin_subscriptions_settings'
- notifications_menu in ./
notifications.module - Implementation of hook_menu().
File
- ./
notifications.admin.inc, line 124
Code
function notifications_admin_subscriptions_settings() {
// Enable / disable subscription types
$type_list = array_map('notifications_format_title_description', notifications_subscription_type());
$form['subscriptions'] = array(
'#title' => t('Enabled Subscription types'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
);
$form['subscriptions']['enabled'] = array(
'#type' => 'checkboxes',
'#options' => $type_list,
'#default_value' => notifications_subscription_type_enabled(),
'#return_value' => TRUE,
'#description' => t('Check the available subscription types that will be enabled globally'),
);
// Link options. These were UI settings that will become global now, so other modules can use them without Notifications UI
$form['links'] = array(
'#title' => t('Subscribe / unsubscribe links options'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
);
$options = array(
t('<strong>Confirmation form</strong>. Links take the user through a confirmation form with some more options.'),
t('<strong>Direct operation</strong>. Links create/delete a subscription without confirmation using default settings.'),
);
$form['links']['notifications_option_subscribe_links'] = array(
'#title' => t('Subscribe links'),
'#type' => 'radios',
'#options' => $options,
'#default_value' => variable_get('notifications_option_subscribe_links', 0),
);
$form['links']['notifications_option_unsubscribe_links'] = array(
'#title' => t('Unsubscribe links'),
'#type' => 'radios',
'#options' => $options,
'#default_value' => variable_get('notifications_option_unsubscribe_links', 0),
);
$form = system_settings_form($form);
// We have our own processing to do after system settings
$form['#submit'][] = 'notifications_admin_subscriptions_settings_submit';
return $form;
}