Skip to content
Snippets Groups Projects
Commit 898fee35 authored by Kostia Bohach's avatar Kostia Bohach
Browse files

Issue #3437331: Issue with edit button display

parent 44db6bd2
No related branches found
Tags 1.1.1
1 merge request!11Issue #3437331: Issue with edit button display
Pipeline #134318 passed
......@@ -22,7 +22,7 @@ function entity_reference_edit_link_preprocess_field_multiple_value_form(&$varia
}
// Adds link column to the table header.
$variables['table']['#header'][] = t('Edit Link', [], ['context' => 'Link']);
$variables['table']['#header'][] = t('Edit Entity', [], ['context' => 'Link']);
$element = $variables['element'];
// Copied some part of the code from the another hook just to add the correct
// values to the render array.
......@@ -46,9 +46,17 @@ function entity_reference_edit_link_preprocess_field_multiple_value_form(&$varia
unset($item['_weight']);
unset($item['_link']);
// Render actions in a separate column.
$actions = [];
if (isset($item['_actions'])) {
$actions = $item['_actions'];
unset($item['_actions']);
}
$cells = [
['data' => '', 'class' => ['field-multiple-drag']],
['data' => $item],
['data' => $actions],
['data' => $delta_element, 'class' => ['delta-order']],
// Adds link element to the render array.
['data' => $link_element, 'class' => ['reference-link']],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment