Commit 0b3113af authored by Gábor Hojtsy's avatar Gábor Hojtsy

#179655 by flobruit: properly disable theme setting checkboxes when certain...

#179655 by flobruit: properly disable theme setting checkboxes when certain features are not available
parent 19b2687a
......@@ -378,9 +378,9 @@ function system_theme_settings(&$form_state, $key = '') {
);
foreach ($toggles as $name => $title) {
if ((!$key) || in_array($name, $features)) {
// disable search box if search.module is disabled
$form['theme_settings']['toggle_'. $name] = array('#type' => 'checkbox', '#title' => $title, '#default_value' => $settings['toggle_'. $name]);
if (isset($disabled[$name])) {
// Disable checkboxes for features not supported in the current configuration.
if (isset($disabled['toggle_'. $name])) {
$form['theme_settings']['toggle_'. $name]['#disabled'] = TRUE;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment