You are here

function theme_hosting_client_user_form in Hosting 6.2

Same name and namespace in other branches
  1. 5 client/hosting_client.access.inc \theme_hosting_client_user_form()
  2. 7.4 client/hosting_client.access.inc \theme_hosting_client_user_form()
  3. 7.3 client/hosting_client.access.inc \theme_hosting_client_user_form()

Returns HTML for the client area on the user form.

File

client/hosting_client.access.inc, line 106
Control client node access.

Code

function theme_hosting_client_user_form($form) {
  if (array_key_exists('hosting_client', $form)) {
    $edit_name = drupal_render($form['hosting_client']);
  }
  else {
    $edit_name = '';
  }
  foreach (element_children($form['name']) as $client) {
    $row = array();
    $row['data'][] = drupal_render($form['name'][$client]);
    if (user_access('edit client users')) {
      $row['data'][] = drupal_render($form['clients'][$client]);
    }
    $rows[] = $row;
  }
  $output = drupal_render($form);
  $output .= theme('table', $form['header']['#value'], $rows);
  $output .= $edit_name;
  return $output;
}