You are here

function theme_hosting_client_form in Hosting 7.3

Same name and namespace in other branches
  1. 5 client/hosting_client.module \theme_hosting_client_form()
  2. 6.2 client/hosting_client.module \theme_hosting_client_form()
  3. 7.4 client/hosting_client.module \theme_hosting_client_form()

@todo Please document this function.

See also

http://drupal.org/node/1354

File

client/hosting_client.module, line 285

Code

function theme_hosting_client_form($variables) {
  $form = $variables['form'];
  foreach (element_children($form['name'], FALSE) as $user) {
    $row = array();

    // @todo: Figure out why drupal_render isn't working here.

    //$row['data'][] = drupal_render($form['name'][$user]);
    $row['data'][] = $form['name'][$user]['#value'];
    if (user_access('edit client users')) {
      $row['data'][] = drupal_render($form['users'][$user]);
    }
    $rows[] = $row;
  }
  $output = theme('table', array(
    'header' => $form['header']['#value'],
    'rows' => $rows,
  ));
  $output .= drupal_render_children($form);
  return $output;
}