You are here

function group_options_form in Group 7

Builds the group administration options.

1 call to group_options_form()
GroupUIController::overviewForm in classes/group.ui_controller.inc
Builds the group overview form.

File

admin/group.inc, line 127
Group overview admin UI.

Code

function group_options_form() {
  $fs_options = array(
    '#type' => 'fieldset',
    '#title' => t('Update options'),
    '#attributes' => array(
      'class' => array(
        'container-inline',
      ),
    ),
  );
  if (!user_access('bypass group access')) {
    $fs_options['#access'] = FALSE;
  }
  else {
    $options = array();
    foreach (module_invoke_all('group_operations') as $operation => $array) {
      if (!empty($array['optgroup'])) {
        $options[$array['optgroup']][$operation] = $array['label'];
      }
      else {
        $options[$operation] = $array['label'];
      }
    }
    $fs_options['operation'] = array(
      '#type' => 'select',
      '#title' => t('Operation'),
      '#title_display' => 'invisible',
      '#options' => $options,
      '#default_value' => 'approve',
    );
    $fs_options['submit'] = array(
      '#type' => 'submit',
      '#value' => t('Update'),
      '#validate' => array(
        'group_options_form_validate',
      ),
      '#submit' => array(
        'group_options_form_submit',
      ),
    );
  }
  return $fs_options;
}