function notifications_anonymous_admin_settings_form in Notifications 6.4
Admin settings form
1 string reference to 'notifications_anonymous_admin_settings_form'
- notifications_anonymous_menu in notifications_anonymous/
notifications_anonymous.module - Implementation of hook_menu()
File
- notifications_anonymous/
notifications_anonymous.pages.inc, line 104 - Notifications for anonymous users
Code
function notifications_anonymous_admin_settings_form() {
$anonymous_methods = array();
foreach (messaging_method_info() as $method => $info) {
if (!empty($info['anonymous'])) {
$anonymous_methods[$method] = check_plain($info['name']);
}
}
$form['notifications_anonymous_send_methods'] = array(
'#title' => t('Allowed messaging methods'),
'#type' => 'checkboxes',
'#options' => $anonymous_methods,
'#default_value' => variable_get('notifications_anonymous_send_methods', array(
'mail',
)),
'#description' => t('Select send methods allowed for anonymous users. Only one of each type (I.e. only one mail method) is allowed.'),
);
$form['notifications_anonymous_send_intervals'] = array(
'#title' => t('Allowed send intervals'),
'#type' => 'checkboxes',
'#options' => _notifications_send_intervals(),
'#default_value' => variable_get('notifications_anonymous_send_intervals', array(
0,
)),
);
// We cannot use form filter because of inmediate send interval is always filtered out
//$form['array_filter'] = array('#type' => 'value', '#value' => TRUE);
$form = system_settings_form($form);
$form['#validate'][] = 'notifications_anonymous_admin_settings_form_validate';
return $form;
}