function notifications_form_subscribe_confirm in Notifications 6.2
Same name and namespace in other branches
- 6 notifications.pages.inc \notifications_form_subscribe_confirm()
- 6.3 notifications.pages.inc \notifications_form_subscribe_confirm()
Form for subscription confirmation
1 string reference to 'notifications_form_subscribe_confirm'
- notifications_page_subscribe in ./
notifications.pages.inc - Menu callback add subscription
File
- ./
notifications.pages.inc, line 219 - User pages for Notifications
Code
function notifications_form_subscribe_confirm($form_state, $subscription, $account) {
// Pass on simple values
foreach (array(
'sid',
'uid',
'type',
'fields',
'event_type',
) as $field) {
$form[$field] = array(
'#type' => 'value',
'#value' => isset($subscription->{$field}) ? $subscription->{$field} : '',
);
}
// The subscription description will be added here
$form['info'] = notifications_subscription_info_field($subscription);
// Additional parameters
$form['send_interval'] = array(
'#type' => 'select',
'#title' => t('Send interval'),
'#options' => notifications_send_intervals(),
'#default_value' => $subscription->send_interval,
);
$send_methods = _notifications_send_methods($account);
$form['send_method'] = array(
'#type' => 'select',
'#title' => t('Send method'),
'#options' => $send_methods,
'#default_value' => $subscription->send_method,
'#disabled' => count($send_methods) < 2,
);
$form['confirm'] = array(
'#type' => 'submit',
'#value' => t('Subscribe'),
);
$form['cancel'] = array(
'#type' => 'submit',
'#value' => t('Cancel'),
);
return $form;
}