You are here

function theme_strongarm_admin_form in Strongarm 7.2

Same name and namespace in other branches
  1. 6.2 strongarm.admin.inc \theme_strongarm_admin_form()
  2. 6 strongarm.admin.inc \theme_strongarm_admin_form()

Theme function for the strongarm admin form.

1 theme call to theme_strongarm_admin_form()
strongarm_admin_form in ./strongarm.admin.inc
Variable management strongarm form.

File

./strongarm.admin.inc, line 122

Code

function theme_strongarm_admin_form(&$vars) {
  $form = $vars['form'];
  drupal_add_js('misc/tableselect.js');
  $rows = $headers = array();
  $headers[] = array(
    'class' => array(
      'select-all',
    ),
  );
  $headers[] = t('Variable');
  $headers[] = t('Storage');
  $headers[] = t('Value');
  if (!empty($form['name'])) {
    foreach (element_children($form['name']) as $name) {
      $row = array();
      $row[] = isset($form['revert'][$name]) ? drupal_render($form['revert'][$name]) : '';
      $row[] = drupal_render($form['name'][$name]);
      $row[] = drupal_render($form['storage'][$name]);
      $row[] = drupal_render($form['value'][$name]);
      $rows[] = $row;
    }
  }
  $output = theme('table', array(
    'header' => $headers,
    'rows' => $rows,
  ));
  $output .= drupal_render_children($form);
  return $output;
}