You are here

function environment_indicator_settings in Environment Indicator 7.2

Same name and namespace in other branches
  1. 6 environment_indicator.admin.inc \environment_indicator_settings()
  2. 7 environment_indicator.admin.inc \environment_indicator_settings()

Module settings form.

1 string reference to 'environment_indicator_settings'
environment_indicator_menu in ./environment_indicator.module
Implements hook_menu().

File

./environment_indicator.admin.inc, line 11
Administrative interface for environment indicator configuration.

Code

function environment_indicator_settings() {
  $form['environment_indicator_suppress_pages'] = array(
    '#type' => 'textarea',
    '#title' => t('Turn off Environment Indicator on these pages'),
    '#default_value' => variable_get('environment_indicator_suppress_pages', ""),
    '#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '<em>blog</em>' for the blog page and '<em>blog/*</em>' for every personal blog. '<em>&lt;front&gt;</em>' is the front page."),
  );
  $integrations = array(
    'toolbar' => t('Toolbar module'),
    'admin_menu' => t('Admin Menu module'),
    'navbar' => t('Mobile Friendly Navigation Toolbar'),
  );
  $form['environment_indicator_integration'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Integrate with'),
    '#options' => $integrations,
    '#default_value' => variable_get('environment_indicator_integration', array(
      'toolbar' => 'toolbar',
      'admin_menu' => 'admin_menu',
      'navbar' => 'navbar',
    )),
    '#description' => t("If you integrate with a module that provides a toolbar then that toolbar will be colorized and the environment name added to it instead of adding a new bar."),
  );
  $form['environment_indicator_git_support'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add GIT support'),
    '#description' => t('If this is checked, the GIT branch name will be displayed along with the environment indicator name.'),
    '#default_value' => variable_get('environment_indicator_git_support', TRUE),
  );
  $form['environment_indicator_favicon_overlay'] = array(
    '#type' => 'checkbox',
    '#title' => t("Change the site's favicon for users who can see the environment indicator"),
    '#description' => t('Puts a colored overlay in the bottom-right corner of the favicon, with the first letter of the environment name.'),
    '#default_value' => variable_get('environment_indicator_favicon_overlay', TRUE),
  );
  $form['#submit'][] = 'environment_indicator_settings_submit';
  return system_settings_form($form);
}