diff --git a/includes/form.inc b/includes/form.inc index c8d0ab7b59071406994c1013bbd9dac52ea541c8..e5d1b1b815bc180a09cbeb054c6a84e330f3857d 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2788,9 +2788,14 @@ function theme_tableselect($variables) { // Add an empty header or a "Select all" checkbox to provide room for the // checkboxes/radios in the first table column. if ($element['#js_select']) { + // Add a "Select all" checkbox when checkboxes are displayed. drupal_add_js('misc/tableselect.js'); array_unshift($header, array('class' => array('select-all'))); } + else { + // Add an empty header when radio buttons are displayed. + array_unshift($header, ''); + } } return theme('table', array('header' => $header, 'rows' => $rows, 'empty' => $element['#empty'], 'attributes' => $element['#attributes'])); }