diff --git a/feeds_ui/feeds_ui.admin.inc b/feeds_ui/feeds_ui.admin.inc index 825911fa678fcf0f38bf5f471ff9364c33fc7a6b..9402cb86105549805975da3633aa1aee7a7404ad 100644 --- a/feeds_ui/feeds_ui.admin.inc +++ b/feeds_ui/feeds_ui.admin.inc @@ -50,7 +50,6 @@ function feeds_ui_mapping_help() { * Build overview of available configurations. */ function feeds_ui_overview_form(&$form_status) { - $form = $form['enabled'] = $form['disabled'] = array(); $form['#header'] = array( @@ -111,7 +110,7 @@ function feeds_ui_overview_form(&$form_status) { $importer_form[$importer->id] = array( '#type' => 'checkbox', '#default_value' => !$importer->disabled, - '#attributes' => array('class' => 'feeds-ui-trigger-submit'), + '#attributes' => array('class' => array('feeds-ui-trigger-submit')), ); if ($importer->disabled) { @@ -124,7 +123,7 @@ function feeds_ui_overview_form(&$form_status) { $form['submit'] = array( '#type' => 'submit', '#value' => t('Save'), - '#attributes' => array('class' => 'feeds-ui-hidden-submit'), + '#attributes' => array('class' => array('feeds-ui-hidden-submit')), ); return $form; } @@ -645,7 +644,8 @@ function _feeds_ui_format_options($options) { /** * Theme feeds_ui_overview_form(). */ -function theme_feeds_ui_overview_form($form) { +function theme_feeds_ui_overview_form($variables) { + $form = $variables['form']; drupal_add_js(drupal_get_path('module', 'feeds_ui') .'/feeds_ui.js'); drupal_add_css(drupal_get_path('module', 'feeds_ui') .'/feeds_ui.css'); // Iterate through all importers and build a table. @@ -657,21 +657,21 @@ function theme_feeds_ui_overview_form($form) { foreach (element_children($form[$type][$id]) as $col) { $row[$col] = array( 'data' => drupal_render($form[$type][$id][$col]), - 'class' => $type, + 'class' => array($type), ); } $rows[] = array( 'data' => $row, - 'class' => $type, + 'class' => array($type), ); } } } $output = ''; if (count($rows)) { - $output .= theme('table', $form['#header'], $rows, array('class' => 'feeds-admin-importers')); + $output .= theme('table', array('header' => $form['#header'], 'rows' => $rows, 'attributes' => array('class' => array('feeds-admin-importers')))); } - $output .= drupal_render($form); + $output .= drupal_render_children($form); return $output; } diff --git a/feeds_ui/feeds_ui.module b/feeds_ui/feeds_ui.module index cf854ac0b7e1da24b6a67a2b7f772ecfda5fa2b7..e85e7be58246ecbb9a75716f47abb40a78f25b95 100644 --- a/feeds_ui/feeds_ui.module +++ b/feeds_ui/feeds_ui.module @@ -88,6 +88,7 @@ function feeds_ui_menu() { function feeds_ui_theme() { return array( 'feeds_ui_overview_form' => array( + 'render element' => 'form', 'file' => 'feeds_ui.admin.inc', ), 'feeds_ui_mapping_form' => array(