diff --git a/includes/form.inc b/includes/form.inc index df1b2f7..1b5ac37 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2796,7 +2796,17 @@ function password_confirm_validate($element, &$element_state) { */ function theme_date($variables) { $element = $variables['element']; - return '
' . drupal_render_children($element) . '
'; + + $attributes = array(); + if (isset($element['#id'])) { + $attributes['id'] = $element['#id']; + } + if (!empty($element['#attributes']['class'])) { + $attributes['class'] = (array) $element['#attributes']['class']; + } + $attributes['class'][] = 'container-inline'; + + return '' . drupal_render_children($element) . ''; } /** diff --git a/modules/file/file.module b/modules/file/file.module index 83de0f6..4fc9985 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']; + } + if (!empty($element['#attributes']['class'])) { + $attributes['class'] = (array) $element['#attributes']['class']; + } + $attributes['class'][] = 'form-managed-file'; + // This wrapper is required to apply JS behaviors and CSS styling. $output = ''; - $output .= '
'; + $output .= ''; $output .= drupal_render_children($element); $output .= '
'; return $output;