You are here

function external_admin_settings in External New Tab 7

Same name and namespace in other branches
  1. 6 external.module \external_admin_settings()

Build the form for the settings page.

1 string reference to 'external_admin_settings'
external_menu in ./external.module
Implements hook_menu().

File

./external.module, line 60

Code

function external_admin_settings() {
  $form = array();
  $form['external_enabled'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable External Module'),
    '#default_value' => variable_get('external_enabled', TRUE),
  );
  $form['external_docs_enabled'] = array(
    '#type' => 'checkbox',
    '#title' => t('Open PDFs in new tabs'),
    '#default_value' => variable_get('external_docs_enabled', FALSE),
  );
  $form['external_disabled_patterns'] = array(
    '#type' => 'textarea',
    '#title' => t('Pages to exclude'),
    '#default_value' => variable_get('external_disabled_patterns', "admin*\nimg_assist*\nnode/add/*\nnode/*/edit"),
    '#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array(
      '%blog' => 'blog',
      '%blog-wildcard' => 'blog/*',
      '%front' => '<front>',
    )),
  );
  return system_settings_form($form);
}