summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngie Byron2009-08-21 00:35:31 (GMT)
committerAngie Byron2009-08-21 00:35:31 (GMT)
commit6df0d7edb6c650616e805a388389bb888a790221 (patch)
tree9015cb425ca7bbea56dc8a59c2a765d30de6d9d8
parentdb61b2603918d582afad82b8036fac7f5240a627 (diff)
#552520 by merlinofchaos: Fixed AJAX wrappers on poll/upload modules.
-rw-r--r--includes/ajax.inc2
-rw-r--r--modules/poll/poll.module2
-rw-r--r--modules/upload/upload.module7
3 files changed, 4 insertions, 7 deletions
diff --git a/includes/ajax.inc b/includes/ajax.inc
index e9ef969..67f507a 100644
--- a/includes/ajax.inc
+++ b/includes/ajax.inc
@@ -363,7 +363,7 @@ function ajax_command_alert($text) {
/**
* Creates a Drupal AJAX 'insert/replaceWith' command.
*
- * The 'insert/replace' command instructs the client to use jQuery's
+ * The 'insert/replaceWith' command instructs the client to use jQuery's
* replaceWith() method to replace each element matched matched by the given
* selector with the given HTML.
*
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 6c044b5..f8d3b37 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -378,8 +378,6 @@ function _poll_choice_form($key, $chid = NULL, $value = '', $votes = 0, $weight
function poll_choice_js($form, $form_state) {
$choice_form = $form['choice_wrapper']['choice'];
- // Prevent duplicate wrappers.
- unset($choice_form['#prefix'], $choice_form['#suffix']);
return theme('status_messages') . drupal_render($choice_form);
}
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 5682c6c..e9fd856 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -236,10 +236,7 @@ function upload_form_alter(&$form, $form_state, $form_id) {
);
// Wrapper for fieldset contents (used by ajax.js).
- $form['attachments']['wrapper'] = array(
- '#prefix' => '<div id="attach-wrapper">',
- '#suffix' => '</div>',
- );
+ $form['attachments']['wrapper'] = array();
// Make sure necessary directories for upload.module exist and are
// writable before displaying the attachment form.
@@ -533,6 +530,8 @@ function _upload_form($node) {
$form = array(
'#theme' => 'upload_form_new',
'#cache' => TRUE,
+ '#prefix' => '<div id="attach-wrapper">',
+ '#suffix' => '</div>',
);
if (!empty($node->files) && is_array($node->files)) {