You are here

function charts_graphs_main_settings_form in Charts and Graphs 7.2

Same name and namespace in other branches
  1. 6.2 charts_graphs.module \charts_graphs_main_settings_form()
  2. 7 charts_graphs.module \charts_graphs_main_settings_form()

Main Charts and Graphs settings form.

1 string reference to 'charts_graphs_main_settings_form'
charts_graphs_menu in ./charts_graphs.module
Implements hook_menu().

File

./charts_graphs.module, line 56

Code

function charts_graphs_main_settings_form($form, &$form_state) {
  $form = array();
  $form['charts_graphs_check_chart_api'] = array(
    '#type' => 'checkbox',
    '#title' => t('Check presence of Chart API module'),
    '#description' => t('Defines if !charts_graphs will check for the presence of the !chart_api
        module. This only affects the presentation of a warning in the
        !status_page complaining about both the Charts and Graphs module and the
        Chart API module being installed at the same time.', array(
      '!charts_graphs' => l(t('Charts and Graphs'), 'http://drupal.org/project/charts_graphs'),
      '!chart_api' => l(t('Chart API'), 'http://drupal.org/project/chart'),
      '!status_page' => l(t('Status report'), 'admin/reports/status'),
    )),
    '#default_value' => variable_get('charts_graphs_check_chart_api', 1),
    '#required' => TRUE,
  );
  $form['charts_graphs_check_charts'] = array(
    '#type' => 'checkbox',
    '#title' => t('Check presence of Charts module'),
    '#description' => t('Defines if !charts_graphs will check for the presence of the !charts
        module. This only affects the presentation of a warning in the
        !status_page complaining about both the Charts and Graphs module and the
        Charts module being installed at the same time.', array(
      '!charts_graphs' => l(t('Charts and Graphs'), 'http://drupal.org/project/charts_graphs'),
      '!charts' => l(t('Charts'), 'http://drupal.org/project/charts'),
      '!status_page' => l(t('Status report'), 'admin/reports/status'),
    )),
    '#default_value' => variable_get('charts_graphs_check_charts', 1),
    '#required' => TRUE,
  );
  $form['charts_graphs_default_series'] = array(
    '#type' => 'textfield',
    '#title' => t('Your default palette'),
    '#description' => t('Fill in the default colour palette for all your charts as a series of comma separated hexadecimal colour definitions. Ex: #123456,#654321,#1177ff'),
    '#default_value' => variable_get("charts_graphs_default_series", ""),
  );
  return system_settings_form($form);
}