diff --git a/modules/file/file.module b/modules/file/file.module index 83de0f6..f2241e6 100644 --- a/modules/file/file.module +++ b/modules/file/file.module @@ -643,9 +643,18 @@ function file_managed_file_save_upload($element) { function theme_file_managed_file($variables) { $element = $variables['element']; + $attributes = array(); + if (isset($element['#id'])) { + $attributes['id'] = $element['#id']; + } + $attributes['class'] = 'form-managed-file'; + if (!empty($element['#attributes']['class'])) { + $attributes['class'] .= ' ' . implode(' ', $element['#attributes']['class']); + } + // This wrapper is required to apply JS behaviors and CSS styling. $output = ''; - $output .= '
'; + $output .= ''; $output .= drupal_render_children($element); $output .= '
'; return $output;