You are here

function theme_domain_batch_form in Domain Access 7.3

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

FormsAPI theming.

File

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

Code

function theme_domain_batch_form($variables) {
  $form = $variables['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('Domain'),
    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_children($form['domain_batch']);
  $output .= theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render_children($form);
  return $output;
}