### Eclipse Workspace Patch 1.0 #P drupal Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.177 diff -u -r1.177 form.inc --- includes/form.inc 31 Jan 2007 15:49:22 -0000 1.177 +++ includes/form.inc 14 Feb 2007 17:44:31 -0000 @@ -672,7 +672,7 @@ $form['#id'] = form_clean_id('edit-'. implode('-', $form['#parents'])); } - if (isset($form['#disabled']) && $form['#disabled']) { + if (isset($form['#disabled']) && $form['#disabled'] && !is_array($form['#disabled'])) { $form['#attributes']['disabled'] = 'disabled'; } @@ -1266,6 +1266,9 @@ if (!isset($element[$key])) { $element[$key] = array('#type' => 'radio', '#title' => $choice, '#return_value' => $key, '#default_value' => $element['#default_value'], '#attributes' => $element['#attributes'], '#parents' => $element['#parents'], '#spawned' => TRUE); } + if (in_array($key, (array)$element['#disabled'])) { + $element[$key]['#attributes']['disabled'] = TRUE; + } } } return $element; @@ -1345,6 +1348,9 @@ if (!isset($element[$key])) { $element[$key] = array('#type' => 'checkbox', '#processed' => TRUE, '#title' => $choice, '#return_value' => $key, '#default_value' => isset($value[$key]), '#attributes' => $element['#attributes']); } + if (in_array($key, (array)$element['#disabled'])) { + $element[$key]['#attributes']['disabled'] = TRUE; + } } } return $element;