? patch_397614.patch
Index: popups_reference.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/popups_reference/popups_reference.module,v
retrieving revision 1.4.2.2
diff -u -p -r1.4.2.2 popups_reference.module
--- popups_reference.module	21 Mar 2009 01:03:20 -0000	1.4.2.2
+++ popups_reference.module	24 Sep 2009 18:37:00 -0000
@@ -92,8 +92,8 @@ function popups_reference_alter_item(&$f
     if ($links) {
       // Put the nodereference widget and links in an wrapper.
       // Makes it easy to find for Ahah targeting, and popups_reference behavior selecting.
-      $form[$key]['#prefix'] = '<div class="'. $wrapper_id .'">';
-      $form[$key]['#suffix'] = '<div>Add New: ' . implode(', ', $links) .'</div></div>';
+      $form[$key]['#prefix'] = '<div class="'. $wrapper_id .'">' . $form[$key]['#prefix'];
+      $form[$key]['#suffix'] .= '<div>Add New: ' . implode(', ', $links) .'</div></div>';
     }
   }
 }
