You are here

function theme_spaces_form_presets in Spaces 6

Same name and namespace in other branches
  1. 5.2 spaces.module \theme_spaces_form_presets()
  2. 6.2 spaces.theme.inc \theme_spaces_form_presets()

Form theme function for spaces presets.

1 theme call to theme_spaces_form_presets()
spaces_form_presets in ./spaces.module
Preset options form that can be reused by implementing modules.

File

./spaces.module, line 1767

Code

function theme_spaces_form_presets($form) {
  $output = '';

  // Render presets in a table
  $rows = array();
  foreach (element_children($form['info']) as $id) {
    unset($form['preset'][$id]['#title']);
    $row = array(
      drupal_render($form['preset'][$id]),
      drupal_render($form['info'][$id]),
    );
    $rows[] = $row;
  }
  $output .= theme('table', array(
    array(
      'data' => $form['preset']['#title'],
      'colspan' => 2,
    ),
  ), $rows);
  drupal_render($form['preset']);

  // Throw out the rest of this element
  $output .= drupal_render($form);
  return $output;
}