Index: field.form.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.form.inc,v
retrieving revision 1.4
diff -u -r1.4 field.form.inc
--- field.form.inc	18 Feb 2009 14:28:22 -0000	1.4
+++ field.form.inc	9 Mar 2009 19:30:33 -0000
@@ -137,12 +137,17 @@
   $title = check_plain(t($instance['label']));
   $description = field_filter_xss(t($instance['description']));
 
+  $bundle_name_url_css = str_replace('_', '-', $instance['bundle']);
+  $field_name_url_css = str_replace('_', '-', $field_name);
+
   $form_element = array(
     '#theme' => 'field_multiple_value_form',
     '#multiple' => $field['cardinality'],
     '#title' => $title,
     '#required' => $instance['required'],
     '#description' => $description,
+    '#prefix' => '<div id="' . $field_name_url_css . '-wrapper">',
+    '#suffix' => '</div>',
   );
 
   $function = $instance['widget']['module'] . '_field_widget';
@@ -151,6 +156,7 @@
       if ($element = $function($form, $form_state, $field, $instance, $items, $delta)) {
         $multiple = $field['cardinality'] > 1 || $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED;
         $defaults = array(
+          // For multiple fields, title and description are handled by the wrapping table.
           '#title' => $multiple ? '' : $title,
           '#description' => $multiple ? '' : $description,
           '#required' => $delta == 0 && $instance['required'],
@@ -161,14 +167,14 @@
           '#bundle' => $instance['bundle'],
         );
 
-        // Add an input field for the delta (drag-n-drop reordering), which will
-        // be hidden by tabledrag js behavior.
+        // Input field for the delta (drag-n-drop reordering).
         if ($multiple) {
-          // We name the element '_weight' to avoid clashing with column names
-          // defined by field modules.
+          // We name the element '_weight' to avoid clashing with elements
+          // defined by widget.
           $element['_weight'] = array(
             '#type' => 'weight',
-            '#delta' => $max, // this 'delta' is the 'weight' element's property
+             // Note: this 'delta' is the FAPI 'weight' element's property.
+            '#delta' => $max,
             '#default_value' => isset($items[$delta]['_weight']) ? $items[$delta]['_weight'] : $delta,
             '#weight' => 100,
           );
@@ -193,8 +199,8 @@
         // Submit callback for disabled JavaScript.
         '#submit' => array('field_add_more_submit'),
         '#ahah' => array(
-          'path' => 'field/js_add_more/' . $bundle_name_url_str . '/' . $field_name_url_str,
-          'wrapper' => $field_name_url_str . '-items',
+          'path' => 'field/js_add_more/' . $bundle_name_url_css . '/' . $field_name_url_css,
+          'wrapper' => $field_name_url_css . '-wrapper',
           'method' => 'replace',
           'effect' => 'fade',
         ),
@@ -202,12 +208,8 @@
         // the relevant field using these entries.
         '#field_name' => $field_name,
         '#bundle' => $instance['bundle'],
+        '#attributes' => array('class' => 'field-add-more-submit'),
       );
-
-      // Add wrappers for the fields and 'more' button.
-      $form_element['#prefix'] = '<div class="clearfix" id="' . $field_name_url_str . '-add-more-wrapper"><div id="' . $field_name_url_str . '-items">';
-      $form_element[$field_name . '_add_more']['#prefix'] = '<div class="field-add-more">';
-      $form_element[$field_name . '_add_more']['#suffix'] =  '</div></div></div>';
     }
   }
   return $form_element;
@@ -229,8 +231,9 @@
 
     $header = array(
       array(
-        'data' => t('!title: !required', array('!title' => $element['#title'], '!required' => $required)),
-        'colspan' => 2
+        'data' => '<label>' . t('!title: !required', array('!title' => $element['#title'], '!required' => $required)) . "</label>",
+        'colspan' => 2,
+        'class' => 'field-label',
       ),
       t('Order'),
     );
@@ -240,7 +243,10 @@
     // preview or failed validation)
     $items = array();
     foreach (element_children($element) as $key) {
-      if ($key !== $element['#field_name'] . '_add_more') {
+      if ($key === $element['#field_name'] . '_add_more') {
+        $add_more_button = &$element[$key];
+      }
+      else {
         $items[] = &$element[$key];
       }
     }
@@ -261,9 +267,11 @@
       );
     }
 
+    $output = '<div class="form-item">';
     $output .= theme('table', $header, $rows, array('id' => $table_id, 'class' => 'field-multiple-table'));
     $output .= $element['#description'] ? '<div class="description">' . $element['#description'] . '</div>' : '';
-    $output .= drupal_render($element[$element['#field_name'] . '_add_more']);
+    $output .= '<div class="clearfix">' . drupal_render($add_more_button) . '</div>';
+    $output .= '</div>';
 
     drupal_add_tabledrag($table_id, 'order', 'sibling', $order_class);
   }
@@ -395,10 +403,11 @@
   foreach ($form_path as $key) {
     $field_form = $field_form[$key];
   }
-  // We add a div around the new field to receive the ahah effect.
-  $field_form[$delta]['#prefix'] = '<div class="ahah-new-field">' . (isset($field_form[$delta]['#prefix']) ? $field_form[$delta]['#prefix'] : '');
+  // Add a div around the new field 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>';
-  // TODO : this causes duplication of the wrapping divs
+  // 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
Index: field.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.module,v
retrieving revision 1.5
diff -u -r1.5 field.module
--- field.module	8 Mar 2009 04:25:04 -0000	1.5
+++ field.module	9 Mar 2009 19:30:33 -0000
@@ -107,6 +107,7 @@
 function field_init() {
   module_load_include('inc', 'field', 'field.crud');
   module_load_include('inc', 'field', 'field.autoload');
+  drupal_add_css(drupal_get_path('module', 'field') . '/theme/field.css');
 }
 
 /**
Index: modules/number/number.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/number/number.module,v
retrieving revision 1.3
diff -u -r1.3 number.module
--- modules/number/number.module	10 Feb 2009 03:16:15 -0000	1.3
+++ modules/number/number.module	9 Mar 2009 19:34:43 -0000
@@ -51,7 +51,7 @@
 function number_field_columns($field) {
   switch ($field['type']) {
     case 'number_integer' :
-      $colums = array(
+      $columns = array(
         'value' => array(
           'type' => 'int',
           'not null' => FALSE
@@ -60,7 +60,7 @@
       break;
 
     case 'number_float' :
-      $colums = array(
+      $columns = array(
         'value' => array(
           'type' => 'float',
           'not null' => FALSE
@@ -69,7 +69,7 @@
       break;
 
     case 'number_decimal' :
-      $colums = array(
+      $columns = array(
         'value' => array(
           'type' => 'numeric',
           'precision' => $field['settings']['precision'],
@@ -79,7 +79,7 @@
       );
       break;
   }
-  return $colums;
+  return $columns;
 }
 
 /**
Index: modules/text/text.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.module,v
retrieving revision 1.3
diff -u -r1.3 text.module
--- modules/text/text.module	10 Feb 2009 03:16:15 -0000	1.3
+++ modules/text/text.module	9 Mar 2009 19:35:31 -0000
@@ -39,6 +39,7 @@
       'description' => t('This field stores varchar text in the database.'),
       'settings' => array('max_length' => 255),
       'instance_settings' => array('text_processing' => 0),
+      'widget_settings' => array('size' => 60),
       'default_widget' => 'text_textfield',
       'default_formatter' => 'text_default',
     ),
@@ -46,6 +47,7 @@
       'label' => t('Long text'),
       'description' => t('This field stores long text in the database.'),
       'instance_settings' => array('text_processing' => 0),
+      'widget_settings' => array('rows' => 5),
       'default_widget' => 'text_textarea',
       'default_formatter' => 'text_default',
     ),
Index: theme/field.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/theme/field.css,v
retrieving revision 1.2
diff -u -r1.2 field.css
--- theme/field.css	5 Feb 2009 03:42:58 -0000	1.2
+++ theme/field.css	9 Mar 2009 19:32:17 -0000
@@ -1,32 +1,38 @@
 /* $Id: field.css,v 1.2 2009/02/05 03:42:58 webchick Exp $ */
 
-/* Node display */
+/* Field display */
 .field .field-label,
 .field .field-label-inline,
 .field .field-label-inline-first {
-  font-weight:bold;
+  font-weight: bold;
 }
 .field .field-label-inline,
 .field .field-label-inline-first {
-  display:inline;
+  display: inline;
 }
 .field .field-label-inline {
-  visibility:hidden;
+  visibility: hidden;
 }
 
-.node-form .field-multiple-table td.field-multiple-drag {
-  width:30px;
-  padding-right:0;
+form .field-multiple-table {
+  margin: 0;
 }
-.node-form .field-multiple-table td.field-multiple-drag a.tabledrag-handle{
-  padding-right:.5em;
+form .field-multiple-table th.field-label {
+  padding-left: 0;
 }
-
-.node-form .field-add-more .form-submit{
-  margin:0;
+form .field-multiple-table td.field-multiple-drag {
+  width: 30px;
+  padding-right: 0;
+}
+form .field-multiple-table td.field-multiple-drag a.tabledrag-handle{
+  padding-right: .5em;
 }
 
-.node-form .number {
-  display:inline;
-  width:auto;
+form .field-add-more-submit {
+  margin: .5em 0 0;
 }
+
+.form-item .number {
+  display: inline;
+  width: auto;
+}
\ No newline at end of file

