summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt2
-rw-r--r--includes/content.node_form.inc2
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 5018c4e..7f28550 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -33,6 +33,8 @@ should be enough, though.
- #362216 by markus_petrux - sort the admin/content/types/fields overview by field name.
- #363456 by dww - Fix some cases of bogus d-n-d reordering of 'pseudo-fields'.
- #366935 by drewish - Make the 'Views mode' feature in noderef / ueserref visible even if no usable View exists yet.
+- #371306 fix duplicate HTML when using the JS-'add more' button.
+
CCK 6.x-2.1
===========
diff --git a/includes/content.node_form.inc b/includes/content.node_form.inc
index 761de5c..1236ee2 100644
--- a/includes/content.node_form.inc
+++ b/includes/content.node_form.inc
@@ -351,6 +351,8 @@ function content_add_more_js($type_name_url, $field_name) {
// We add a div around the new content to receive the ahah effect.
$field_form[$delta]['#prefix'] = '<div class="ahah-new-content">'. (isset($field_form[$delta]['#prefix']) ? $field_form[$delta]['#prefix'] : '');
$field_form[$delta]['#suffix'] = (isset($field_form[$delta]['#suffix']) ? $field_form[$delta]['#suffix'] : '') .'</div>';
+ // Prevent duplicate wrapper.
+ unset($field_form['#prefix'], $field_form['#suffix']);
// If a newly inserted widget contains AHAH behaviors, they normally won't
// work because AHAH doesn't know about those - it just attaches to the exact