summaryrefslogtreecommitdiff
path: root/modules/poll/poll.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r--modules/poll/poll.module10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index f8d3b37c0..84a84b0e0 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -758,21 +758,23 @@ function theme_poll_choices($form) {
foreach (element_children($form) as $key) {
$delta++;
// Set special classes for drag and drop updating.
- $form[$key]['weight']['#attributes']['class'] = 'poll-weight';
+ $form[$key]['weight']['#attributes']['class'] = array('poll-weight');
// Build the table row.
$row = array(
'data' => array(
- array('class' => 'choice-flag'),
+ array('class' => array('choice-flag')),
drupal_render($form[$key]['chtext']),
drupal_render($form[$key]['chvotes']),
drupal_render($form[$key]['weight']),
),
- 'class' => 'draggable',
+ 'class' => array('draggable'),
);
// Add any additional classes set on the row.
- $row['class'] .= isset($form[$key]['#attributes']['class']) ? ' ' . $form[$key]['#attributes']['class'] : '';
+ if (!empty($form[$key]['#attributes']['class'])) {
+ $row['class'] = array_merge($row['class'], $form[$key]['#attributes']['class']);
+ }
$rows[] = $row;
}