diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-04-07 17:30:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-04-07 17:30:43 +0000 |
commit | d5ce7f5281373044b8e1df6d95287270c0b33145 (patch) | |
tree | 0105e507304fc399d892bcca8f6805b3ae3d4739 /misc | |
parent | 27aa5b1b174cb24ac10d3524773d9f6412d2297d (diff) | |
download | brdo-d5ce7f5281373044b8e1df6d95287270c0b33145.tar.gz brdo-d5ce7f5281373044b8e1df6d95287270c0b33145.tar.bz2 |
- Patch #384992 by effulgentsia, sun: drupal_html_id() does not work correctly in AJAX context with multiple forms on page.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ajax.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/ajax.js b/misc/ajax.js index f8e3ee6d3..1d6c8295d 100644 --- a/misc/ajax.js +++ b/misc/ajax.js @@ -200,6 +200,12 @@ Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) { // Disable the element that received the change. $(this.element).addClass('progress-disabled').attr('disabled', true); + // Prevent duplicate HTML ids in the returned markup. + // @see drupal_html_id() + $('[id]').each(function () { + form_values.push({ name: 'ajax_html_ids[]', value: this.id }); + }); + // Insert progressbar or throbber. if (this.progress.type == 'bar') { var progressBar = new Drupal.progressBar('ajax-progress-' + this.element.id, eval(this.progress.update_callback), this.progress.method, eval(this.progress.error_callback)); |