function forcejs_form_system_performance_settings_alter in Force JS 7
Implements hook_form_FORM_ID_alter().
File
- ./
forcejs.module, line 35 - Removes the has_js cookie.
Code
function forcejs_form_system_performance_settings_alter(&$form, &$form_state) {
$form['force_js'] = array(
'#type' => 'fieldset',
'#title' => t('JavaScript cookie'),
);
$form['force_js']['force_js'] = array(
'#type' => 'radios',
'#title' => t('Enforce cookie value'),
'#default_value' => variable_get('force_js', 'unset'),
'#options' => array(
'unset' => t('Remove for users with an open session'),
'1' => t('Remove for all users but pretend its presence'),
),
'#description' => t('Choose the conditions under which the <code>has_js</code> cookie is removed. If advanced page level caching affecting users with an open session is in place (e.g., Authcache or ESI), cookie removal must be performed for all users.'),
);
}