diff --git a/core/modules/views_ui/templates/views-ui-style-plugin-table.html.twig b/core/modules/views_ui/templates/views-ui-style-plugin-table.html.twig index 734802a..27463f5 100644 --- a/core/modules/views_ui/templates/views-ui-style-plugin-table.html.twig +++ b/core/modules/views_ui/templates/views-ui-style-plugin-table.html.twig @@ -1,19 +1,18 @@ {# /** * @file - * Default template for the settings of a table style Views display. + * Default template for the settings of a table style views display. * * Available variables: - * - description: An overview for the settings of this display. * - table: A table of options for each field in this display. * - form: Any remaining form fields not included in the table. + * - description_markup: An overview for the settings of this display. * - * @see template_preprocess() * @see template_preprocess_views_ui_style_plugin_table() * * @ingroup themeable */ #} -{{ description }} +{{ form.description_markup }} {{ table }} {{ form }} diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc index d9e057c..30286bd 100644 --- a/core/modules/views_ui/views_ui.theme.inc +++ b/core/modules/views_ui/views_ui.theme.inc @@ -334,9 +334,6 @@ function theme_views_ui_rearrange_filter_form(&$variables) { function template_preprocess_views_ui_style_plugin_table(&$variables) { $form = $variables['form']; - $variables['description'] = $form['description_markup']; - unset($form['description_markup']); - $header = array( t('Field'), t('Column'), @@ -371,11 +368,6 @@ function template_preprocess_views_ui_style_plugin_table(&$variables) { $row[]['data'] = $form['info'][$id]['align']; $row[]['data'] = $form['info'][$id]['separator']; - // Unset so they don't get rendered in drupal_render_children. - unset($form['info'][$id]['name']); - unset($form['columns'][$id]); - unset($form['info'][$id]['align']); - unset($form['info'][$id]['separator']); if (!empty($form['info'][$id]['sortable'])) { $row[] = array( 'data' => $form['info'][$id]['sortable'], @@ -389,9 +381,6 @@ function template_preprocess_views_ui_style_plugin_table(&$variables) { 'data' => $form['default'][$id], 'align' => 'center', ); - // Unset so they don't get rendered in drupal_render_children. - unset($form['info'][$id]['sortable']); - unset($form['info'][$id]['default_sort_order']); } else { $row[] = ''; @@ -407,19 +396,22 @@ function template_preprocess_views_ui_style_plugin_table(&$variables) { 'align' => 'center', ); $rows[] = $row; - // Unset so they don't get rendered in drupal_render_children. - unset($form['info'][$id]['empty_column']); - unset($form['info'][$id]['responsive']); } // Add the special 'None' row. $rows[] = array(array('data' => t('None'), 'colspan' => 6), array('align' => 'center', 'data' => $form['default'][-1]), array('colspan' => 2)); + + // Unset elements from the form array that are used to build the table so that + // they are not rendered twice. unset($form['default']); + unset($form['info']); + unset($form['columns']); + $variables['table'] = array( '#type' => 'table', '#theme' => 'table__views_ui_style_plugin_table', '#header' => $header, - '#rows' => $rows + '#rows' => $rows, ); $variables['form'] = $form; }