You are here

function theme_data_ui_edit_form in Data 6

Same name and namespace in other branches
  1. 7 data_ui/data_ui.admin.inc \theme_data_ui_edit_form()

Theme data_ui_edit_form.

File

data_ui/data_ui.admin.inc, line 890
Admin UI functions.

Code

function theme_data_ui_edit_form($form) {

  // Format existing fields.
  $rows = array();
  foreach (element_children($form['fields']) as $e) {
    $row = array();
    foreach (element_children($form['fields'][$e]) as $f) {
      $row[] = drupal_render($form['fields'][$e][$f]);
    }
    $row[] = ' ';
    $rows[] = $row;
  }

  // New fields form.
  $row = array(
    ' ',
  );
  foreach (element_children($form['new']) as $e) {
    $row[] = drupal_render($form['new'][$e]);
  }
  $rows[] = $row;
  $header = array(
    t('Select'),
    t('Name'),
    t('Label'),
    t('Type'),
    t('Size'),
    t('Unsigned'),
    t('Index'),
    t('Primary key'),
    t('Joins'),
  );
  $output = theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}