| 1 system.admin.inc | system_jquery_settings() |
Form builder; Configure jQuery settings.
Related topics
File
- core/
modules/ system/ system.admin.inc, line 1843 - 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)'),
'4.x' => t('jQuery 4 (experimental)'),
);
$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 default version of jQuery in Backdrop CMS.');
$form['jquery_version']['legacy']['#description'] = t('Alternative for sites with modules or themes which are not working properly with the recommended version.');
$form['jquery_version']['4.x']['#description'] = t('The latest version of jQuery.');
$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);
}