4.7 upload.module theme_upload_form_current(&$form)
5 upload.module theme_upload_form_current(&$form)
6 upload.module theme_upload_form_current($form)

Theme the attachments list.

Related topics

2 string references to the theme hook from theme_upload_form_current()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

upload_theme in modules/upload/upload.module
Implementation of hook_theme()
_upload_form in modules/upload/upload.module


modules/upload/upload.module, line 524
File-handling and attaching files to nodes.


function theme_upload_form_current($form) {
  $header = array('', t('Delete'), t('List'), t('Description'), t('Weight'), t('Size'));
  drupal_add_tabledrag('upload-attachments', 'order', 'sibling', 'upload-weight');

  foreach (element_children($form) as $key) {
    // Add class to group weight fields for drag and drop.
    $form[$key]['weight']['#attributes']['class'] = 'upload-weight';

    $row = array('');
    $row[] = drupal_render($form[$key]['remove']);
    $row[] = drupal_render($form[$key]['list']);
    $row[] = drupal_render($form[$key]['description']);
    $row[] = drupal_render($form[$key]['weight']);
    $row[] = drupal_render($form[$key]['size']);
    $rows[] = array('data' => $row, 'class' => 'draggable');
  $output = theme('table', $header, $rows, array('id' => 'upload-attachments'));
  $output .= drupal_render($form);
  return $output;