You are here

function browserclass_settings_form in Browser Class 7

Same name and namespace in other branches
  1. 6 browserclass.module \browserclass_settings_form()

Provide Browser Class settings form.

1 string reference to 'browserclass_settings_form'
browserclass_menu in ./browserclass.module
Implements hook_menu().

File

./browserclass.module, line 87
Provides Browser Class settings form, permission, and browser detection.

Code

function browserclass_settings_form() {
  $form = [];
  $form['browserclass_operation'] = [
    '#type' => 'radios',
    '#title' => t('Operation'),
    '#options' => [
      BROWSERCLASS_OPERATION_WITH_JS => t('Always add the class with JavaScript'),
      BROWSERCLASS_OPERATION_WITHOUT_JS => t('Only use JavaScript if page cache is enabled'),
    ],
    '#default_value' => variable_get('browserclass_operation', BROWSERCLASS_OPERATION_WITHOUT_JS),
  ];
  return system_settings_form($form);
}