diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-06-27 18:05:54 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-06-27 18:05:54 +0000 |
commit | 4771540eea0f559851bd6f4244a5c6b8db4d93be (patch) | |
tree | f94bfaaeae49eb215b7c819049bdbb343fa22b4f /modules/field_ui | |
parent | 15fe37a76b5c2ecda669e16a03f644ed14b9d0a3 (diff) | |
download | brdo-4771540eea0f559851bd6f4244a5c6b8db4d93be.tar.gz brdo-4771540eea0f559851bd6f4244a5c6b8db4d93be.tar.bz2 |
#838040 by justinrandell, azriprajwala: Fixed notices thrown when adding a stock field to a stock content type.
Diffstat (limited to 'modules/field_ui')
-rw-r--r-- | modules/field_ui/field_ui.admin.inc | 2 | ||||
-rw-r--r-- | modules/field_ui/field_ui.test | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/modules/field_ui/field_ui.admin.inc b/modules/field_ui/field_ui.admin.inc index 94fe876c5..5b8383876 100644 --- a/modules/field_ui/field_ui.admin.inc +++ b/modules/field_ui/field_ui.admin.inc @@ -515,7 +515,7 @@ function _field_ui_field_overview_form_validate_add_new($form, &$form_state) { // Add the 'field_' prefix. if (substr($field_name, 0, 6) != 'field_') { $field_name = 'field_' . $field_name; - form_set_value($form['_add_new_field']['field_name'], $field_name, $form_state); + form_set_value($form['table']['_add_new_field']['field_name'], $field_name, $form_state); } // Invalid field name. diff --git a/modules/field_ui/field_ui.test b/modules/field_ui/field_ui.test index 4a82c7a2e..5baaa341a 100644 --- a/modules/field_ui/field_ui.test +++ b/modules/field_ui/field_ui.test @@ -34,7 +34,8 @@ class FieldUITestCase extends DrupalWebTestCase { // Create random field name. $this->field_label = $this->randomName(8); - $this->field_name = 'field_' . strtolower($this->randomName(8)); + $this->field_name_input = strtolower($this->randomName(8)); + $this->field_name = 'field_'. $this->field_name_input; } /** @@ -85,7 +86,7 @@ class FieldUITestCase extends DrupalWebTestCase { // Create a test field. $edit = array( '_add_new_field[label]' => $this->field_label, - '_add_new_field[field_name]' => $this->field_name, + '_add_new_field[field_name]' => $this->field_name_input, ); $this->fieldUIAddNewField('admin/structure/types/manage/' . $this->hyphen_type, $edit); |