You are here

function theme_user_import_edit in User Import 7.3

Same name and namespace in other branches
  1. 8 user_import.module \theme_user_import_edit()
  2. 6.4 user_import.module \theme_user_import_edit()
  3. 6.2 user_import.module \theme_user_import_edit()
  4. 7 user_import.module \theme_user_import_edit()
  5. 7.2 user_import.module \theme_user_import_edit()

File

./user_import.module, line 408
Import or update users with data from a comma separated file (csv).

Code

function theme_user_import_edit($variables) {
  $output = '';
  $rows = array();
  $form = $variables['form'];
  $header = array(
    t('CSV column'),
    t('Drupal fields'),
    t('Username'),
    t('Abbreviate'),
  );
  foreach (element_children($form['field_match']) as $key) {
    $rows[] = array(
      drupal_render($form['field_match'][$key]['csv']),
      drupal_render($form['field_match'][$key]['field_match']),
      drupal_render($form['field_match'][$key]['username']),
      drupal_render($form['field_match'][$key]['abbreviate']),
    );
  }
  $form['field_match']['#value'] = theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  if (isset($form['remove'])) {
    $output .= drupal_render($form['remove']);
  }
  if (isset($form['options'])) {
    $output .= drupal_render($form['options']);
  }
  if (isset($form['field_match'])) {
    $output .= drupal_render($form['field_match']);
  }
  $output .= drupal_render_children($form);
  return $output;
}