You are here

function theme_filefield_widget_item in FileField 6.3

File

./filefield_widget.inc, line 504
This file contains CCK widget related functionality.

Code

function theme_filefield_widget_item($element) {

  // Put the upload button directly after the upload field.
  $element['upload']['#field_suffix'] = drupal_render($element['filefield_upload']);
  $element['upload']['#theme'] = 'filefield_widget_file';
  $output = '';
  $output .= '<div class="filefield-element clear-block">';
  if ($element['fid']['#value'] != 0) {
    $output .= '<div class="widget-preview">';
    $output .= drupal_render($element['preview']);
    $output .= '</div>';
  }
  $output .= '<div class="widget-edit">';
  $output .= drupal_render($element);
  $output .= '</div>';
  $output .= '</div>';
  return $output;
}