function notifications_form_alter in Notifications 6.3
Same name and namespace in other branches
- 5 notifications.module \notifications_form_alter()
- 6.4 notifications.module \notifications_form_alter()
- 6 notifications.module \notifications_form_alter()
- 6.2 notifications.module \notifications_form_alter()
Implementation of hook_form_alter()
File
- ./
notifications.module, line 334 - Notifications module
Code
function notifications_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
// Default send interval for user form
case 'user_profile_form':
if ($form['_category']['#value'] == 'account' && (user_access('maintain own subscriptions') || user_access('administer notifications'))) {
$form['messaging']['#title'] = t('Messaging and Notifications settings');
$send_intervals = _notifications_send_intervals();
$form['messaging']['notifications_send_interval'] = array(
'#type' => 'select',
'#title' => t('Default send interval'),
'#options' => $send_intervals,
'#default_value' => notifications_user_setting('send_interval', $form['_account']['#value']),
'#disabled' => count($send_intervals) == 1,
'#description' => t('Default send interval for subscriptions.'),
);
}
}
}