Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.244
diff -u -r1.244 poll.module
--- modules/poll/poll.module	17 Oct 2007 12:34:16 -0000	1.244
+++ modules/poll/poll.module	17 Oct 2007 17:02:25 -0000
@@ -202,7 +202,7 @@
   // Add a wrapper for the choices and more button.
   $form['choice_wrapper'] = array(
     '#tree' => FALSE,
-    '#weight' => -5,
+    '#weight' => -4,
     '#prefix' => '<div class="clear-block" id="poll-choice-wrapper">',
     '#suffix' => '</div>',
   );
@@ -236,12 +236,11 @@
       'method' => 'replace',
       'effect' => 'fade',
     ),
+    // Change the button title to reflect the behavior when using javascript.
+    // Done as a suffix to ensure the script stays with the button.
+    '#suffix' => '<script type="text/javascript">if (Drupal.jsEnabled) { $("#edit-poll-more").val("'. t('Add another choice') .'"); }</script>',
   );
 
-  // If we're using the javascript version (99% use-case), change the button
-  // title to 'Add another choice' to reflect the javascript behavior.
-  drupal_add_js("if (Drupal.jsEnabled) { $(document).ready(function() { $('#edit-poll-more').val('". t('Add another choice') ."'); }); }", 'inline');
-
   // Poll attributes
   $_duration = array(0 => t('Unlimited')) + drupal_map_assoc(array(86400, 172800, 345600, 604800, 1209600, 2419200, 4838400, 9676800, 31536000), "format_interval");
   $_active = array(0 => t('Closed'), 1 => t('Active'));
@@ -251,7 +250,7 @@
       '#type' => 'fieldset',
       '#collapsible' => TRUE,
       '#title' => t('Poll settings'),
-      '#weight' => -4,
+      '#weight' => -3,
     );
 
     $form['settings']['active'] = array(
