function notifications_scheduler_default_action_form in Notifications 7
Action: Configuration form
Parameters
$context: Regular action context plus 'event_type' element
1 call to notifications_scheduler_default_action_form()
- notifications_scheduler_new_posts_action_form in notifications_scheduler/
notifications_scheduler.module - Action: Configuration form
File
- notifications_scheduler/
notifications_scheduler.module, line 124 - Notifications scheduler module
Code
function notifications_scheduler_default_action_form($context, $event_type) {
$context += array(
'event_type' => $event_type,
);
$form['event_type'] = array(
'#type' => 'value',
'#value' => $context['event_type'],
);
// Configurable template
$template_list = array();
foreach (notifications_info('message templates') as $key => $template) {
if ($template['object'] == 'node_list') {
$template_list[$key] = $template['title'];
}
}
$form['template'] = array(
'#title' => t('Template'),
'#type' => 'select',
'#options' => $template_list,
'#default_value' => isset($context['template']) ? $context['template'] : notifications_event_type($context['event_type'], 'template'),
'#required' => TRUE,
);
return $form;
}