You are here

function statspro_main_admin_settings_form in Statistics Pro 6.2

Main admin settings form.

1 string reference to 'statspro_main_admin_settings_form'
statspro_menu in ./statspro.module
Implementation of hook_menu().

File

./statspro_admin_settings.inc, line 14

Code

function statspro_main_admin_settings_form() {
  $form = statspro_settings_form(variable_get('statspro_period', 'today'), variable_get('statspro_custom_number_days', 30));
  $charting_libraries = statspro_get_available_charts_graphs();
  if ($charting_libraries) {
    $form['#validate'][] = 'statspro_admin_settings_form_validate';
    $charting_library_options = array();
    foreach ($charting_libraries as $charting_library) {
      $charting_library_options[$charting_library->name] = $charting_library->nice_name;
    }
    ksort($charting_library_options);
    $form['statspro_charting_library'] = array(
      '#type' => 'select',
      '#title' => t('Charting library'),
      '#options' => $charting_library_options,
      '#default_value' => statspro_get_current_charting_option(),
      '#required' => TRUE,
      '#weight' => 5,
      '#multiple' => FALSE,
    );
  }
  $form['optional_requirements'] = array(
    '#type' => 'fieldset',
    '#title' => t('Optional requirements'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#weight' => 100,
  );
  statspro_optional_dependency_statistics($form);
  statspro_optional_dependency_access_log($form);
  statspro_optional_dependency_charts_graphs($form);
  statspro_optional_dependency_views_charts($form);
  statspro_optional_dependency_advanced_help($form);
  statspro_include_link_to_advanced_help_pages($form);
  return $form;
}