function notifications_manage_subscriptions_form_options in Notifications 7
Same name and namespace in other branches
- 6.4 notifications.manage.inc \notifications_manage_subscriptions_form_options()
Form options
1 call to notifications_manage_subscriptions_form_options()
- notifications_manage_subscriptions_form in ./
notifications.manage.inc - Administer subscriptions. For user tabs and admin tabs
File
- ./
notifications.manage.inc, line 99 - Common functions for bulk management of subscriptions
Code
function notifications_manage_subscriptions_form_options($admin_access = FALSE) {
$form['options'] = array(
'#type' => 'fieldset',
'#title' => t('Update options'),
'#prefix' => '<div class="container-inline">',
'#suffix' => '</div>',
// if the current user is able to perform any operations hide the form element.
'#access' => $admin_access,
);
$options = array();
foreach (notifications_manage_subscriptions_operations($admin_access) as $operation => $array) {
if (!empty($array['parent'])) {
$options[$array['parent']][$operation] = $array['label'];
}
else {
$options[$operation] = $array['label'];
}
}
$form['options']['operation'] = array(
'#type' => 'select',
'#options' => $options,
'#default_value' => 'approve',
);
$form['options']['submit'] = array(
'#type' => 'submit',
'#value' => t('Update'),
'#validate' => array(
'notifications_manage_subscriptions_form_validate',
),
'#submit' => array(
'notifications_manage_subscriptions_form_submit',
),
);
return $form;
}