Commit e7fe1830 authored by Dries's avatar Dries

- Patch #614294 by lisarex, yched, Bojhan: remove UI description that says...

- Patch #614294 by lisarex, yched, Bojhan: remove UI description that says what is stored in the field.
parent 98258d6c
......@@ -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>';
......
......@@ -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'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment