diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc index ccf2517..ad201ba 100644 --- a/core/modules/file/file.field.inc +++ b/core/modules/file/file.field.inc @@ -7,7 +7,6 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Template\Attribute; /** * Implements hook_field_info(). @@ -603,7 +602,6 @@ function template_preprocess_file_widget(&$variables) { $file = reset($element['#files']); $element['file_' . $file->id()]['filename']['#suffix'] = ' (' . format_size($file->getSize()) . ') '; } - $variables['element'] = drupal_render_children($element); // The "form-managed-file" class is required for proper Ajax functionality. $variables['attributes'] = array('class' => array('file-widget', 'form-managed-file', 'clearfix')); } diff --git a/core/modules/file/file.module b/core/modules/file/file.module index 978ad27..29033d9 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -1515,7 +1515,6 @@ function file_managed_file_save_upload($element) { * @param array $variables * An associative array containing: * - element: A render element representing the file. - * - element_attributes: An Array of HTML attributes. */ function template_preprocess_file_managed_file(&$variables) { $element = $variables['element']; diff --git a/core/modules/file/templates/file-link.html.twig b/core/modules/file/templates/file-link.html.twig index ba0bea5..7cf515e 100644 --- a/core/modules/file/templates/file-link.html.twig +++ b/core/modules/file/templates/file-link.html.twig @@ -12,6 +12,9 @@ * @see template_preprocess_file_link() * * @ingroup themeable + * + * @todo: Remove the separated class and let attributes render it if it exists, + * hopefully avoiding an empty class attribute in markup. */ #} {{ icon }} {{ link }} diff --git a/core/modules/file/templates/file-upload-help.html.twig b/core/modules/file/templates/file-upload-help.html.twig index fe6554c..cdcb30a 100644 --- a/core/modules/file/templates/file-upload-help.html.twig +++ b/core/modules/file/templates/file-upload-help.html.twig @@ -11,6 +11,4 @@ * @ingroup themeable */ #} -{% for description in descriptions %} - {{ description|t }}
-{% endfor %} +{{ descriptions|t|join('
') }}