You are here

function notifications_destination_manage_subscriptions_form_options in Notifications 6.4

Form options

1 call to notifications_destination_manage_subscriptions_form_options()
notifications_destination_manage_form in includes/destination.inc
Destination manage subscriptions form

File

includes/destination.inc, line 335
Destination management

Code

function notifications_destination_manage_subscriptions_form_options($account) {
  $form['options'] = array(
    '#type' => 'fieldset',
    '#title' => t('Update options'),
    '#prefix' => '<div class="container-inline">',
    '#suffix' => '</div>',
  );
  $options = array();
  foreach (notifications_destination_subscriptions_operations($account) 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;
}