summaryrefslogtreecommitdiff
path: root/modules/field_ui
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-09-16 20:14:49 +0000
committerDries Buytaert <dries@buytaert.net>2010-09-16 20:14:49 +0000
commit2c10d1526fa2feddbbd40f73a9cb894091a5d8a7 (patch)
tree8325f0b7c3c08a0e8d829c204fe80493a5c6fd2a /modules/field_ui
parent8e3e0036357335a339c55bf50d63c0d7ad13fc92 (diff)
downloadbrdo-2c10d1526fa2feddbbd40f73a9cb894091a5d8a7.tar.gz
brdo-2c10d1526fa2feddbbd40f73a9cb894091a5d8a7.tar.bz2
- Patch #740834 by makononov, sun: form elements cannot be rendered without form_builder().
Diffstat (limited to 'modules/field_ui')
-rw-r--r--modules/field_ui/field_ui.admin.inc15
1 files changed, 12 insertions, 3 deletions
diff --git a/modules/field_ui/field_ui.admin.inc b/modules/field_ui/field_ui.admin.inc
index cf3e8c3e9..dcfd7eca4 100644
--- a/modules/field_ui/field_ui.admin.inc
+++ b/modules/field_ui/field_ui.admin.inc
@@ -1648,13 +1648,22 @@ function field_ui_field_edit_form($form, &$form_state, $instance) {
$bundles = field_info_bundles();
// Create a form structure for the instance values.
- $form['instance'] = array(
+ // @todo Fieldset element info needs to be merged in order to not skip the
+ // default element definition for #pre_render. While the current default
+ // value could simply be hard-coded, we'd possibly forget this location
+ // when system_element_info() is updated. See also form_builder(). This
+ // particular #pre_render, field_ui_field_edit_instance_pre_render(), might
+ // as well be entirely needless though.
+ $form['instance'] = array_merge(element_info('fieldset'), array(
'#tree' => TRUE,
'#type' => 'fieldset',
'#title' => t('%type settings', array('%type' => $bundles[$entity_type][$bundle]['label'])),
- '#description' => t('These settings apply only to the %field field when used in the %type type.', array('%field' => $instance['label'], '%type' => $bundles[$entity_type][$bundle]['label'])),
+ '#description' => t('These settings apply only to the %field field when used in the %type type.', array(
+ '%field' => $instance['label'],
+ '%type' => $bundles[$entity_type][$bundle]['label'],
+ )),
'#pre_render' => array('field_ui_field_edit_instance_pre_render'),
- );
+ ));
// Build the non-configurable instance values.
$form['instance']['field_name'] = array(