Commit f8022777 authored by alexpott's avatar alexpott

Issue #2502781 by tedstein, johnshortess, joelpittet, pwolanin, stefan.r, chx,...

Issue #2502781 by tedstein, johnshortess, joelpittet, pwolanin, stefan.r, chx, mandclu, RavindraSingh, YesCT, cilefen, xjm, lauriii: Remove SafeMarkup::set in template_preprocess_file_widget_multiple()
parent 8bfdce26
......@@ -6,7 +6,6 @@
*/
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Render\Element;
......@@ -96,13 +95,6 @@ function template_preprocess_file_widget_multiple(&$variables) {
// Render everything else together in a column, without the normal wrappers.
$widget['#theme_wrappers'] = array();
$information = drupal_render($widget);
// Render the previously hidden elements, using render() instead of
// drupal_render(), to undo the earlier hide().
$operations = '';
foreach ($operations_elements as $operation_element) {
$operations .= render($operation_element);
}
$display = '';
if ($element['#display_field']) {
unset($widget['display']['#title']);
......@@ -121,7 +113,15 @@ function template_preprocess_file_widget_multiple(&$variables) {
$row[] = $display;
}
$row[] = $weight;
$row[] = SafeMarkup::set($operations);
// Show the buttons that had previously been marked as hidden in this
// preprocess function. We use show() to undo the earlier hide().
foreach (Element::children($operations_elements) as $key) {
show($operations_elements[$key]);
}
$row[] = array(
'data' => $operations_elements,
);
$rows[] = array(
'data' => $row,
'class' => isset($widget['#attributes']['class']) ? array_merge($widget['#attributes']['class'], array('draggable')) : array('draggable'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment