You are here

function theme_spaces_customtext_settings_form in Spaces 7.3

Same name and namespace in other branches
  1. 6.3 spaces_customtext/spaces_customtext.admin.inc \theme_spaces_customtext_settings_form()
  2. 7 spaces_customtext/spaces_customtext.admin.inc \theme_spaces_customtext_settings_form()

Theme function for customtext fields.

File

spaces_customtext/spaces_customtext.admin.inc, line 57

Code

function theme_spaces_customtext_settings_form() {

  // TODO Number of parameters in this theme funcion does not match number of parameters found in hook_theme.
  drupal_add_css(drupal_get_path('module', 'spaces_customtext') . '/spaces_customtext.css');
  $rows = array();
  foreach (element_children($element) as $key) {
    $label = $element[$key]['#title'];
    unset($element[$key]['#title']);
    $rows[] = array(
      $label,
      drupal_render($element[$key]),
    );
  }
  $output = theme('table', array(
    'header' => array(
      t('Original'),
      t('Customized'),
    ),
    'rows' => $rows,
    'attributes' => array(
      'class' => 'spaces-customtext',
    ),
  ));
  $output .= drupal_render($element);
  return $output;
}