You are here

function theme_domain_batch_form in Domain Access 6.2

Same name and namespace in other branches
  1. 5 domain_admin.inc \theme_domain_batch_form()
  2. 7.3 domain.admin.inc \theme_domain_batch_form()
  3. 7.2 domain.admin.inc \theme_domain_batch_form()

FormsAPI

File

./domain.admin.inc, line 924
Administration functions for the domain module.

Code

function theme_domain_batch_form($form) {
  $output = '';
  $output = drupal_render($form['message']);
  if (isset($form['domain_batch_all'])) {
    $output .= drupal_render($form['domain_batch_all']);
  }
  $header = array(
    t('Id'),
    t('Site name'),
    t('Setting'),
  );
  $rows = array();
  foreach (element_children($form['domain_batch']) as $key) {
    $temp = $form['domain_batch'][$key]['#title'];
    unset($form['domain_batch'][$key]['#title']);
    $row = array(
      $key,
      $form['domain_batch'][$key]['#sitename'] . '<div class="description">' . $form['domain_batch'][$key]['#subdomain'] . '</div>',
      drupal_render($form['domain_batch'][$key]),
    );
    $rows[] = $row;
    $form['domain_batch'][$key]['#title'] = $temp;
  }
  $output .= drupal_render($form['domain_batch']);
  $output .= theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}