diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-11-08 09:24:55 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-11-08 09:24:55 +0000 |
commit | e7fe1830d2e1a5c383674720ed0b96c2a2a273c6 (patch) | |
tree | 452ef460425b2e12ac43215a7defd9eb8786e15d /modules/field_ui | |
parent | 98258d6c59cf01074bdfcbd127de4c40309f02df (diff) | |
download | brdo-e7fe1830d2e1a5c383674720ed0b96c2a2a273c6.tar.gz brdo-e7fe1830d2e1a5c383674720ed0b96c2a2a273c6.tar.bz2 |
- Patch #614294 by lisarex, yched, Bojhan: remove UI description that says what is stored in the field.
Diffstat (limited to 'modules/field_ui')
-rw-r--r-- | modules/field_ui/field_ui.admin.inc | 17 | ||||
-rw-r--r-- | modules/field_ui/field_ui.test | 4 |
2 files changed, 5 insertions, 16 deletions
diff --git a/modules/field_ui/field_ui.admin.inc b/modules/field_ui/field_ui.admin.inc index b22390551..32808a43b 100644 --- a/modules/field_ui/field_ui.admin.inc +++ b/modules/field_ui/field_ui.admin.inc @@ -812,20 +812,14 @@ function field_ui_field_settings_form($form, &$form_state, $obj_type, $bundle, $ $field = field_read_field($field['field_name']); } - $field_type = field_info_field_types($field['type']); - - $info_function = $field['module'] . '_field_info'; - $info = $info_function(); - $description = '<p><strong>' . $info[$field['type']]['label'] . ':</strong> '; - $description .= $info[$field['type']]['description'] . '</p>'; - $form['#prefix'] = '<div class="description">' . $description . '</div>'; + drupal_set_title($instance['label']); $description = '<p>' . t('These settings apply to the %field field everywhere it is used. These settings impact the way that data is stored in the database and cannot be changed once data has been created.', array('%field' => $instance['label'])) . '</p>'; // Create a form structure for the field values. $form['field'] = array( '#type' => 'fieldset', - '#title' => t('%field field settings', array('%field' => $instance['label'])), + '#title' => t('Field settings'), '#description' => $description, '#tree' => TRUE, ); @@ -856,7 +850,7 @@ function field_ui_field_settings_form($form, &$form_state, $obj_type, $bundle, $ // responsible for not returning settings that cannot be changed if // the field already has data. $form['field']['settings'] = array(); - $additions = module_invoke($field_type['module'], 'field_settings_form', $field, $instance, $has_data); + $additions = module_invoke($field['module'], 'field_settings_form', $field, $instance, $has_data); if (is_array($additions)) { $form['field']['settings'] = $additions; } @@ -1138,11 +1132,6 @@ function field_ui_field_edit_form($form, &$form_state, $obj_type, $bundle, $inst field_ui_default_value_widget($field, $instance, $form, $form_state); } - $info = field_info_field_types($field['type']); - $description = '<p><strong>' . $info['label'] . ':</strong> '; - $description .= $info['description'] . '</p>'; - $form['#prefix'] = '<div class="description">' . $description . '</div>'; - $has_data = field_has_data($field); if ($has_data) { $description = '<p>' . t('These settings apply to the %field field everywhere it is used. Because the field already has data, some settings can no longer be changed.', array('%field' => $instance['label'])) . '</p>'; diff --git a/modules/field_ui/field_ui.test b/modules/field_ui/field_ui.test index 9bf73f7df..0c2dde897 100644 --- a/modules/field_ui/field_ui.test +++ b/modules/field_ui/field_ui.test @@ -13,7 +13,7 @@ class FieldUITestCase extends DrupalWebTestCase { public static function getInfo() { return array( 'name' => 'Field UI tests', - 'description' => 'Test the filed UI functionality.', + 'description' => 'Test the field UI functionality.', 'group' => 'Field UI', ); } @@ -87,7 +87,7 @@ class FieldUITestCase extends DrupalWebTestCase { $edit['_add_new_field[widget_type]'] = 'test_field_widget'; $this->drupalPost('admin/structure/types/manage/' . $this->hyphen_type . '/fields', $edit, t('Save')); - $this->assertText(t('@label field settings', array('@label' => $this->field_label)), t('Field settings page was displayed.')); + $this->assertRaw(t('These settings apply to the %label field everywhere it is used.', array('%label' => $this->field_label)), t('Field settings page was displayed.')); $this->drupalPost(NULL, array(), t('Save field settings')); |