You are here

function chr_admin_settings_form in cURL HTTP Request 7

Same name and namespace in other branches
  1. 6 chr.admin.inc \chr_admin_settings_form()

Form settings array

1 string reference to 'chr_admin_settings_form'
chr_menu in ./chr.module
Implements hook_menu().

File

./chr.admin.inc, line 11
Admin settings

Code

function chr_admin_settings_form($form, &$form_state) {
  $form['#access'] = array(
    'administer chr',
  );
  $form['chr_override_drupal_http_request'] = array(
    '#type' => 'checkbox',
    '#title' => t('Override Drupal HTTP Request'),
    '#description' => t('Set all HTTP requests to use cURL instead. Requires Drupal 7.21 or higher.'),
    '#disabled' => !(VERSION >= 7.21),
    '#default_value' => variable_get('chr_override_drupal_http_request', FALSE),
  );
  $form['chr_debug'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Debug Output'),
    '#description' => t('Display all HTTP requests/response objects via Devel.'),
    '#default_value' => variable_get('chr_debug'),
    '#access' => module_exists('devel'),
  );

  // @todo add proxy settings (see README)
  $form['#submit'][] = 'chr_admin_settings_form_submit';
  return system_settings_form($form);
}