You are here

function theme_tipsy_custom_selectors_form in Tipsy 7

Same name and namespace in other branches
  1. 8 tipsy.module \theme_tipsy_custom_selectors_form()

Theme the table form for tipsy rules.

1 theme call to theme_tipsy_custom_selectors_form()
tipsy_admin in ./tipsy.admin.inc
Implementation of tipsy admin form.

File

./tipsy.admin.inc, line 231

Code

function theme_tipsy_custom_selectors_form($variables) {
  $form = $variables['form'];
  $rows = array();
  $headers = array(
    t('Selectors'),
    t('Options'),
  );
  foreach (element_children($form) as $key) {
    $row = array(
      'data' => array(
        array(
          'data' => drupal_render($form[$key]['selector']),
        ),
        array(
          'data' => drupal_render($form[$key]['options']),
        ),
      ),
    );
    $rows[] = $row;
  }
  $output = theme('table', array(
    'header' => $headers,
    'rows' => $rows,
  ));
  $output .= drupal_render_children($form);
  return $output;
}