diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-10-05 17:53:30 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-10-05 17:53:30 -0700 |
commit | 18fb44809f2d98af2921db0b275b32626aa19ed1 (patch) | |
tree | 8b0a2616169f77af261514b6f0006ecb51f03801 /modules/field_ui | |
parent | a78b13d02ce801d1e4a926f739efa8df01099616 (diff) | |
download | brdo-18fb44809f2d98af2921db0b275b32626aa19ed1.tar.gz brdo-18fb44809f2d98af2921db0b275b32626aa19ed1.tar.bz2 |
Issue #1248940 by yched: Fixed 'Manage fields' screens : broken table layout.
Diffstat (limited to 'modules/field_ui')
-rw-r--r-- | modules/field_ui/field_ui.admin.inc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/field_ui/field_ui.admin.inc b/modules/field_ui/field_ui.admin.inc index 828d64ca8..ce84d83e5 100644 --- a/modules/field_ui/field_ui.admin.inc +++ b/modules/field_ui/field_ui.admin.inc @@ -254,12 +254,17 @@ function theme_field_ui_table($variables) { $row += $element['#attributes']; } + // Render children as table cells. foreach (element_children($element) as $cell_key) { - $cell = array('data' => drupal_render($element[$cell_key])); - if (isset($element[$cell_key]['#cell_attributes'])) { - $cell += $element[$cell_key]['#cell_attributes']; + $child = &$element[$cell_key]; + // Do not render a cell for children of #type 'value'. + if (!(isset($child['#type']) && $child['#type'] == 'value')) { + $cell = array('data' => drupal_render($child)); + if (isset($child['#cell_attributes'])) { + $cell += $child['#cell_attributes']; + } + $row['data'][] = $cell; } - $row['data'][] = $cell; } $table['rows'][] = $row; } @@ -519,6 +524,8 @@ function field_ui_field_overview_form($form, &$form_state, $entity_type, $bundle '#cell_attributes' => array('colspan' => 3), '#prefix' => '<div class="add-new-placeholder"> </div>', ), + // Place the 'translatable' property as an explicit value so that contrib + // modules can form_alter() the value for newly created fields. 'translatable' => array( '#type' => 'value', '#value' => FALSE, |