1 system.admin.inc system_jquery_settings()

Form builder; Configure jQuery settings.

Related topics

File

core/modules/system/system.admin.inc, line 1814
Admin page callbacks for the System module.

Code

function system_jquery_settings() {
  $config = config('system.core');

  $form['#config'] = 'system.core';

  $options = array(
    'default' => t('jQuery 3 (recommended)'),
    'legacy' => t('jQuery 1 (legacy)'),
  );
  $form['jquery_version'] = array(
    '#type' => 'radios',
    '#title' => t('jQuery version'),
    '#default_value' => $config->get('jquery_version'),
    '#options' => $options,
  );
  $form['jquery_version']['default']['#description'] = t('The latest, default version of jQuery.');
  $form['jquery_version']['legacy']['#description'] = t('Use the legacy version if any modules or themes are not working properly with the latest version.');
  $form['help'] = array(
    '#type' => 'help',
    '#markup' => t('<a href="@url">More information about jQuery</a> can be found in the documentation.', array('@url' => url('https://docs.backdropcms.org/documentation/jquery'))),
  );

  return system_settings_form($form);
}