summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngie Byron2010-08-30 17:07:49 (GMT)
committerAngie Byron2010-08-30 17:07:49 (GMT)
commit8911c4ef4527f3eeeb7916d80b55f884d315c10f (patch)
treee36e8df1d4a3a7493d9def701f93eed7646c6371
parent9fedd987820577ccac8c59909ccdc76a445121f3 (diff)
#891476 by solotandem: Fixed Tableselect is missing a column header when not multiple value.
-rw-r--r--includes/form.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/form.inc b/includes/form.inc
index c8d0ab7..e5d1b1b 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']));
}