You are here

function jquery_update_settings in jQuery Update 6.2

Same name and namespace in other branches
  1. 6 jquery_update.module \jquery_update_settings()

Admin settings form.

1 string reference to 'jquery_update_settings'
jquery_update_menu in ./jquery_update.module
Implementation of hook_menu().

File

./jquery_update.module, line 154
Updates Drupal to use the latest version of jQuery.

Code

function jquery_update_settings() {

  // Clear the javascript cache when the setting is updated and check version of jquery file.
  $form['#submit'][] = 'drupal_clear_js_cache';
  $form['#submit'][] = 'jquery_update_flush_caches';
  $form['jquery_update_compression_type'] = array(
    '#type' => 'radios',
    '#title' => t('Choose jQuery compression level'),
    '#options' => array(
      'min' => t('Production (Minified)'),
      'none' => t('Development (Uncompressed Code)'),
    ),
    '#default_value' => variable_get('jquery_update_compression_type', 'min'),
  );
  $form['jquery_update_jquery_version'] = array(
    '#type' => 'select',
    '#title' => t('jQuery Version'),
    '#options' => array(
      '1.3' => '1.3',
      '1.7' => '1.7',
    ),
    '#default_value' => variable_get('jquery_update_jquery_version', '1.3'),
    '#description' => t('Select which jQuery version branch to use.'),
  );
  return system_settings_form($form);
}