function _notifications_content_add_disable_field in Notifications 6.4
Same name and namespace in other branches
- 6.2 notifications_content/notifications_content.module \_notifications_content_add_disable_field()
- 6.3 notifications_content/notifications_content.module \_notifications_content_add_disable_field()
- 7 notifications_content/notifications_content.module \_notifications_content_add_disable_field()
Add disable (skip notifications) field set
1 call to _notifications_content_add_disable_field()
- notifications_content_form_alter in notifications_content/
notifications_content.module - Implementation of hook_form_alter().
File
- notifications_content/
notifications_content.module, line 178 - Subscriptions to content events
Code
function _notifications_content_add_disable_field(&$form, $default = 0) {
if (user_access('skip notifications')) {
// Add fieldset without affecting any other elements there
$form['notifications']['#type'] = 'fieldset';
$form['notifications']['#title'] = t('Notifications');
$form['notifications']['#collapsible'] = TRUE;
$form['notifications']['notifications_content_disable'] = array(
'#type' => 'checkbox',
'#title' => t('Do not send notifications for this update.'),
'#default_value' => $default,
);
}
}