Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.859
diff -u -r1.859 system.module
--- modules/system/system.module	10 Dec 2009 15:39:43 -0000	1.859
+++ modules/system/system.module	10 Dec 2009 20:16:57 -0000
@@ -2488,7 +2488,9 @@
  *   The form structure.
  */
 function system_settings_form($form, $automatic_defaults = TRUE) {
-  $form['buttons']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration') );
+  $form['actions']['#type'] = 'container';
+  $form['actions']['#attributes']['class'][] = 'form-actions';
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
 
   if ($automatic_defaults) {
     $form = _system_settings_form_automatic_defaults($form);
@@ -2599,7 +2601,10 @@
   $form['description'] = array('#markup' => $description);
   $form[$name] = array('#type' => 'hidden', '#value' => 1);
 
-  $form['actions'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('container-inline', 'form-actions')),
+  );
   $form['actions']['submit'] = array('#type' => 'submit', '#value' => $yes ? $yes : t('Confirm'));
   $form['actions']['cancel'] = array('#markup' => $cancel);
   // By default, render the form using theme_confirm_form().
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.235
diff -u -r1.235 system.admin.inc
--- modules/system/system.admin.inc	9 Dec 2009 15:40:06 -0000	1.235
+++ modules/system/system.admin.inc	10 Dec 2009 20:16:57 -0000
@@ -343,7 +343,11 @@
     '#title' => t('Use the administration theme when editing or creating content'),
     '#default_value' => variable_get('node_admin_theme', '0'),
   );
-  $form['admin_theme']['submit'] = array(
+  $form['admin_theme']['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['admin_theme']['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save configuration'),
   );
@@ -862,7 +866,8 @@
     );
   }
 
-  $form['submit'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save configuration'),
   );
@@ -1216,7 +1221,8 @@
       '#type' => 'checkboxes',
       '#options' => $options,
     );
-    $form['buttons']['submit'] = array(
+    $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+    $form['actions']['submit'] = array(
       '#type' => 'submit',
       '#value' => t('Uninstall'),
     );
@@ -2699,7 +2705,8 @@
     ),
   );
 
-  $form['update'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['update'] = array(
     '#type' => 'submit',
     '#value' => ($dfid ? t('Save format') : t('Add format')),
   );
@@ -2826,7 +2833,8 @@
     '#options' => $options,
     '#description' => '',
   );
-  $form['parent']['buttons']['submit'] = array(
+  $form['parent']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['parent']['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Create'),
   );
@@ -2922,7 +2930,8 @@
     '#type' => 'hidden',
     '#value' => '1',
   );
-  $form['buttons']['submit'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save'),
     '#weight' => 13
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.103
diff -u -r1.103 node.pages.inc
--- modules/node/node.pages.inc	2 Dec 2009 19:26:22 -0000	1.103
+++ modules/node/node.pages.inc	10 Dec 2009 20:16:56 -0000
@@ -269,16 +269,19 @@
   }
 
   // Add the buttons.
-  $form['buttons'] = array();
-  $form['buttons']['#weight'] = 100;
-  $form['buttons']['submit'] = array(
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+    '#weight' => 100,
+  );
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#access' => variable_get('node_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_REQUIRED || (!form_get_errors() && isset($form_state['node_preview'])),
     '#value' => t('Save'),
     '#weight' => 5,
     '#submit' => array('node_form_submit'),
   );
-  $form['buttons']['preview'] = array(
+  $form['actions']['preview'] = array(
     '#access' => variable_get('node_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_DISABLED,
     '#type' => 'submit',
     '#value' => t('Preview'),
@@ -286,7 +289,7 @@
     '#submit' => array('node_form_build_preview'),
   );
   if (!empty($node->nid) && node_access('delete', $node)) {
-    $form['buttons']['delete'] = array(
+    $form['actions']['delete'] = array(
       '#type' => 'submit',
       '#value' => t('Delete'),
       '#weight' => 15,
Index: modules/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.105
diff -u -r1.105 content_types.inc
--- modules/node/content_types.inc	4 Dec 2009 16:49:46 -0000	1.105
+++ modules/node/content_types.inc	10 Dec 2009 20:16:56 -0000
@@ -238,7 +238,8 @@
     '#value' => $type->locked,
   );
 
-  $form['submit'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save content type'),
     '#weight' => 40,
@@ -246,7 +247,7 @@
 
   if ($type->custom) {
     if (!empty($type->type)) {
-      $form['delete'] = array(
+      $form['actions']['delete'] = array(
         '#type' => 'submit',
         '#value' => t('Delete content type'),
         '#weight' => 45,
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.82
diff -u -r1.82 node.admin.inc
--- modules/node/node.admin.inc	4 Dec 2009 16:49:46 -0000	1.82
+++ modules/node/node.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -196,10 +196,11 @@
     );
   }
 
-  $form['filters']['buttons']['submit'] = array('#type' => 'submit', '#value' => (count($session) ? t('Refine') : t('Filter')));
+  $form['filters']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['filters']['actions']['submit'] = array('#type' => 'submit', '#value' => (count($session) ? t('Refine') : t('Filter')));
   if (count($session)) {
-    $form['filters']['buttons']['undo'] = array('#type' => 'submit', '#value' => t('Undo'));
-    $form['filters']['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));
+    $form['filters']['actions']['undo'] = array('#type' => 'submit', '#value' => t('Undo'));
+    $form['filters']['actions']['reset'] = array('#type' => 'submit', '#value' => t('Reset'));
   }
 
   drupal_add_js('misc/form.js');
@@ -250,7 +251,7 @@
   $output .= '</dd>';
 
   $output .= '</dl>';
-  $output .= '<div class="container-inline" id="node-admin-buttons">' . drupal_render($form['buttons']) . '</div>';
+  $output .= '<div class="container-inline" id="node-admin-buttons">' . drupal_render($form['actions']) . '</div>';
 
   return $output;
 }
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.275
diff -u -r1.275 locale.module
--- modules/locale/locale.module	7 Dec 2009 05:02:37 -0000	1.275
+++ modules/locale/locale.module	10 Dec 2009 20:16:56 -0000
@@ -913,7 +913,7 @@
   foreach (element_children($form['status']) as $key) {
     $output .= drupal_render($form['status'][$key]);
   }
-  $output .= '<div id="locale-translation-buttons">' . drupal_render($form['buttons']) . '</div>';
+  $output .= '<div id="locale-translation-buttons">' . drupal_render($form['actions']) . '</div>';
   return $output;
 }
 
@@ -1019,7 +1019,8 @@
     );
   }
 
-  $form['buttons']['submit'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save configuration'),
   );
Index: modules/image/image.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.admin.inc,v
retrieving revision 1.16
diff -u -r1.16 image.admin.inc
--- modules/image/image.admin.inc	8 Nov 2009 13:23:41 -0000	1.16
+++ modules/image/image.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -388,12 +388,12 @@
     '#value' => isset($_GET['weight']) ? intval($_GET['weight']) : (isset($effect['weight']) ? $effect['weight'] : count($style['effects'])),
   );
 
-  $form['buttons'] = array('#tree' => FALSE);
-  $form['buttons']['submit'] = array(
+  $form['actions'] = array('#tree' => FALSE, '#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => isset($effect['ieid']) ? t('Update effect') : t('Add effect'),
   );
-  $form['buttons']['cancel'] = array(
+  $form['actions']['cancel'] = array(
     '#type' => 'link',
     '#title' => t('Cancel'),
     '#href' => 'admin/config/media/image-styles/edit/' . $style['name'],
Index: modules/filter/filter.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v
retrieving revision 1.53
diff -u -r1.53 filter.admin.inc
--- modules/filter/filter.admin.inc	8 Dec 2009 03:10:51 -0000	1.53
+++ modules/filter/filter.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -36,7 +36,8 @@
     $form['formats'][$id]['delete'] = array('#type' => 'link', '#title' => t('delete'), '#href' => 'admin/config/content/formats/' . $id . '/delete', '#access' => !$form['formats'][$id]['#is_fallback']);
     $form['formats'][$id]['weight'] = array('#type' => 'weight', '#default_value' => $format->weight);
   }
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Save changes'));
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save changes'));
   return $form;
 }
 
@@ -174,7 +175,8 @@
     $group .= $tiplist;
     $form['tips'] = array('#markup' => '<h2>' . t('Formatting guidelines') . '</h2>' . $group);
   }
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
 
   return $form;
 }
@@ -297,7 +299,8 @@
     return $form;
   }
   $form['settings']['#tree'] = TRUE;
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
 
   return $form;
 }
@@ -353,7 +356,8 @@
     }
   }
   $form['format'] = array('#type' => 'hidden', '#value' => $format->format);
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
 
   return $form;
 }
Index: modules/aggregator/aggregator.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v
retrieving revision 1.46
diff -u -r1.46 aggregator.admin.inc
--- modules/aggregator/aggregator.admin.inc	2 Dec 2009 14:56:32 -0000	1.46
+++ modules/aggregator/aggregator.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -470,7 +470,8 @@
   // Implementing modules will expect an array at $form['modules'].
   $form['modules'] = array();
 
-  $form['submit'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save configuration'),
   );
Index: modules/aggregator/aggregator.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.pages.inc,v
retrieving revision 1.37
diff -u -r1.37 aggregator.pages.inc
--- modules/aggregator/aggregator.pages.inc	9 Oct 2009 00:59:55 -0000	1.37
+++ modules/aggregator/aggregator.pages.inc	10 Dec 2009 20:16:56 -0000
@@ -184,7 +184,8 @@
       '#multiple' => TRUE
     );
   }
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Save categories'));
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save categories'));
 
   return $form;
 }
Index: modules/profile/profile.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v
retrieving revision 1.36
diff -u -r1.36 profile.admin.inc
--- modules/profile/profile.admin.inc	2 Dec 2009 14:56:32 -0000	1.36
+++ modules/profile/profile.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -284,7 +284,9 @@
     '#title' => t('Visible in user registration form.'),
     '#default_value' => $edit['register'],
   );
-  $form['submit'] = array('#type' => 'submit',
+
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array('#type' => 'submit',
     '#value' => t('Save field'),
   );
   return $form;
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.814
diff -u -r1.814 comment.module
--- modules/comment/comment.module	4 Dec 2009 16:49:46 -0000	1.814
+++ modules/comment/comment.module	10 Dec 2009 20:16:56 -0000
@@ -1826,13 +1826,17 @@
   // already previewing the submission. However, if there are form errors,
   // we hide the save button no matter what, so that optional form elements
   // (e.g., captchas) can be updated.
-  $form['submit'] = array(
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save'),
     '#access' => variable_get('comment_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_REQUIRED || (!form_get_errors() && isset($form_state['comment_preview'])),
     '#weight' => 19,
   );
-  $form['preview'] = array(
+  $form['actions']['preview'] = array(
     '#type' => 'submit',
     '#value' => t('Preview'),
     '#access' => (variable_get('comment_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_DISABLED),
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.91
diff -u -r1.91 user.admin.inc
--- modules/user/user.admin.inc	2 Dec 2009 17:04:25 -0000	1.91
+++ modules/user/user.admin.inc	10 Dec 2009 20:16:57 -0000
@@ -72,16 +72,21 @@
     );
   }
 
-  $form['filters']['buttons']['submit'] = array(
+  $form['filters']['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions', 'container-inline')),
+    '#id' => 'user-admin-buttons',
+  );
+  $form['filters']['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => (count($session) ? t('Refine') : t('Filter')),
   );
   if (count($session)) {
-    $form['filters']['buttons']['undo'] = array(
+    $form['filters']['actions']['undo'] = array(
       '#type' => 'submit',
       '#value' => t('Undo'),
     );
-    $form['filters']['buttons']['reset'] = array(
+    $form['filters']['actions']['reset'] = array(
       '#type' => 'submit',
       '#value' => t('Reset'),
     );
@@ -698,7 +703,9 @@
     $form['checkboxes'][$rid] = array('#type' => 'checkboxes', '#options' => $options, '#default_value' => isset($status[$rid]) ? $status[$rid] : array());
     $form['role_names'][$rid] = array('#markup' => $name, '#tree' => TRUE);
   }
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Save permissions'));
+  
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save permissions'));
 
   $form['#attached']['js'][] = drupal_get_path('module', 'user') . '/user.permissions.js';
 
@@ -787,11 +794,12 @@
       '#type' => 'value',
       '#value' => $rid,
     );
-    $form['submit'] = array(
+    $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+    $form['actions']['submit'] = array(
       '#type' => 'submit',
       '#value' => t('Save role'),
     );
-    $form['delete'] = array(
+    $form['actions']['delete'] = array(
       '#type' => 'submit',
       '#value' => t('Delete role'),
     );
@@ -916,7 +924,7 @@
   $output .= '</dd>';
 
   $output .= '</dl>';
-  $output .= '<div class="container-inline" id="user-admin-buttons">' . drupal_render($form['buttons']) . '</div>';
+  $output .= drupal_render($form['actions']);
 
   return $output;
 }
Index: modules/shortcut/shortcut.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/shortcut/shortcut.admin.inc,v
retrieving revision 1.3
diff -u -r1.3 shortcut.admin.inc
--- modules/shortcut/shortcut.admin.inc	2 Dec 2009 15:09:16 -0000	1.3
+++ modules/shortcut/shortcut.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -78,7 +78,8 @@
     'js' => array(drupal_get_path('module', 'shortcut') . '/shortcut.admin.js'),
   );
 
-  $form['submit'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit', 
     '#value' => t('Save configuration'),
   );
@@ -195,7 +196,8 @@
     'js' => array(drupal_get_path('module', 'shortcut') . '/shortcut.admin.js'),
   );
 
-  $form['submit'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit', 
     '#value' => t('Save Changes'),
   );
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.238
diff -u -r1.238 locale.inc
--- includes/locale.inc	9 Dec 2009 15:35:48 -0000	1.238
+++ includes/locale.inc	10 Dec 2009 20:16:56 -0000
@@ -72,7 +72,8 @@
     '#options' => $options,
     '#default_value' => language_default('language'),
   );
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'));
   $form['#theme'] = 'locale_languages_overview_form';
 
   return $form;
@@ -199,7 +200,11 @@
     '#options' => $predefined,
     '#description' => t('Select the desired language and click the <em>Add language</em> button. (Use the <em>Custom language</em> options if your desired language does not appear in this list.)'),
   );
-  $form['language list']['submit'] = array('#type' => 'submit', '#value' => t('Add language'));
+  $form['language list']['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['language list']['actions']['submit'] = array('#type' => 'submit', '#value' => t('Add language'));
   return $form;
 }
 
@@ -213,7 +218,11 @@
     '#collapsed' => TRUE,
   );
   _locale_languages_common_controls($form['custom language']);
-  $form['custom language']['submit'] = array(
+  $form['custom language']['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['custom language']['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Add custom language')
   );
@@ -232,7 +241,11 @@
 function locale_languages_edit_form($form, &$form_state, $langcode) {
   if ($language = db_query("SELECT * FROM {languages} WHERE language = :language", array(':language' => $langcode))->fetchObject()) {
     _locale_languages_common_controls($form, $language);
-    $form['submit'] = array(
+    $form['actions'] = array(
+      '#type' => 'container',
+      '#attributes' => array('class' => array('form-actions')),
+    );
+    $form['actions']['submit'] = array(
       '#type' => 'submit',
       '#value' => t('Save language')
     );
@@ -513,7 +526,11 @@
     _locale_languages_configure_form_language_table($form, $type);
   }
 
-  $form['submit'] = array(
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save settings'),
   );
@@ -1141,12 +1158,13 @@
     }
   }
 
-  $form['filters']['buttons']['submit'] = array(
+  $form['filters']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['filters']['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Filter'),
   );
   if (!empty($_SESSION['locale_translation_filter'])) {
-    $form['filters']['buttons']['reset'] = array(
+    $form['filters']['actions']['reset'] = array(
       '#type' => 'submit',
       '#value' => t('Reset')
     );
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.416
diff -u -r1.416 form.inc
--- includes/form.inc	5 Dec 2009 16:03:51 -0000	1.416
+++ includes/form.inc	10 Dec 2009 20:16:56 -0000
@@ -2303,17 +2303,20 @@
  *   The processed element.
  */
 function form_process_container($element, &$form_state) {
-  $element['#id'] = drupal_html_id(implode('-', $element['#parents']) . '-wrapper');
+  // Generate the ID of the element if it's not explicitly given.
+  if (!isset($element['#id'])) {
+    $element['#id'] = drupal_html_id(implode('-', $element['#parents']) . '-wrapper');
+  }
   return $element;
 }
 
 /**
- * Adds a container for grouped items
+ * Adds a container for grouped items.
  *
- * @param $element
- *   An associative array containing the properties and children of the
- *   group.
- *   Properties used: #id, #attributes, #children.
+ * @param $variables
+ *   An associative array containing:
+ *   - element: An associative array containing the properties of the element.
+ *     Properties used: #id, #attributes, #children.
  * @return
  *   A themed HTML string representing the form element.
  *
Index: modules/contact/contact.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v
retrieving revision 1.37
diff -u -r1.37 contact.pages.inc
--- modules/contact/contact.pages.inc	6 Dec 2009 23:56:47 -0000	1.37
+++ modules/contact/contact.pages.inc	10 Dec 2009 20:16:56 -0000
@@ -102,7 +102,11 @@
     '#title' => t('Send yourself a copy.'),
     '#access' => $user->uid,
   );
-  $form['submit'] = array(
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Send message'),
   );
Index: modules/contact/contact.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.admin.inc,v
retrieving revision 1.18
diff -u -r1.18 contact.admin.inc
--- modules/contact/contact.admin.inc	9 Oct 2009 02:34:07 -0000	1.18
+++ modules/contact/contact.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -97,7 +97,11 @@
     '#type' => 'value',
     '#value' => $category['cid'],
   );
-  $form['submit'] = array(
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save'),
   );
Index: modules/dblog/dblog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.module,v
retrieving revision 1.46
diff -u -r1.46 dblog.module
--- modules/dblog/dblog.module	6 Dec 2009 18:11:41 -0000	1.46
+++ modules/dblog/dblog.module	10 Dec 2009 20:16:56 -0000
@@ -172,7 +172,7 @@
     '#options' => array(0 => t('All')) + drupal_map_assoc(array(100, 1000, 10000, 100000, 1000000)),
     '#description' => t('The maximum number of entries to keep in the database log. Requires a <a href="@cron">cron maintenance task</a>.', array('@cron' => url('admin/reports/status')))
   );
-  $form['buttons']['#weight'] = 1;
+  $form['actions']['#weight'] = 1;
 }
 
 /**
@@ -187,6 +187,6 @@
   foreach (element_children($form['status']) as $key) {
     $output .= drupal_render($form['status'][$key]);
   }
-  $output .= '<div id="dblog-admin-buttons">' . drupal_render($form['buttons']) . '</div>';
+  $output .= '<div id="dblog-admin-buttons">' . drupal_render($form['actions']) . '</div>';
   return $output;
 }
Index: modules/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.32
diff -u -r1.32 dblog.admin.inc
--- modules/dblog/dblog.admin.inc	2 Dec 2009 14:56:32 -0000	1.32
+++ modules/dblog/dblog.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -291,12 +291,13 @@
     }
   }
 
-  $form['filters']['buttons']['submit'] = array(
+  $form['filters']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['filters']['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Filter'),
   );
   if (!empty($_SESSION['dblog_overview_filter'])) {
-    $form['filters']['buttons']['reset'] = array(
+    $form['filters']['actions']['reset'] = array(
       '#type' => 'submit',
       '#value' => t('Reset')
     );
Index: modules/block/block.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v
retrieving revision 1.65
diff -u -r1.65 block.admin.inc
--- modules/block/block.admin.inc	7 Dec 2009 21:16:31 -0000	1.65
+++ modules/block/block.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -102,7 +102,8 @@
   // Do not allow disabling the main system content block.
   unset($form['system_main']['region']['#options'][BLOCK_REGION_NONE]);
 
-  $form['submit'] = array(
+  $form['actions'] = array('#tree' => FALSE, '#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save blocks'),
   );
@@ -359,7 +360,8 @@
     '#default_value' => isset($block->custom) ? $block->custom : 0,
   );
 
-  $form['submit'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save block'),
   );
Index: modules/forum/forum.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.admin.inc,v
retrieving revision 1.27
diff -u -r1.27 forum.admin.inc
--- modules/forum/forum.admin.inc	15 Oct 2009 12:27:33 -0000	1.27
+++ modules/forum/forum.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -55,9 +55,13 @@
   );
 
   $form['vid'] = array('#type' => 'hidden', '#value' => variable_get('forum_nav_vocabulary', ''));
-  $form['submit' ] = array('#type' => 'submit', '#value' => t('Save'));
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['actions']['submit' ] = array('#type' => 'submit', '#value' => t('Save'));
   if ($edit['tid']) {
-    $form['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
+    $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
     $form['tid'] = array('#type' => 'hidden', '#value' => $edit['tid']);
   }
   $form['#submit'][] = 'forum_form_submit';
@@ -156,12 +160,16 @@
     '#type' => 'hidden',
     '#value' => variable_get('forum_nav_vocabulary', ''),
   );
-  $form['submit'] = array(
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save')
   );
   if ($edit['tid']) {
-    $form['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
+    $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
     $form['tid'] = array('#type' => 'value', '#value' => $edit['tid']);
   }
   $form['#submit'][] = 'forum_form_submit';
Index: modules/syslog/syslog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/syslog/syslog.module,v
retrieving revision 1.31
diff -u -r1.31 syslog.module
--- modules/syslog/syslog.module	4 Dec 2009 16:49:47 -0000	1.31
+++ modules/syslog/syslog.module	10 Dec 2009 20:16:56 -0000
@@ -46,7 +46,7 @@
       '#options'       => syslog_facility_list(),
       '#description'   => t('Depending on the system configuration, Syslog and other logging tools use this code to identify or filter messages from within the entire system log.') . $help,
      );
-    $form['buttons']['#weight'] = 1;
+    $form['actions']['#weight'] = 1;
   }
 }
 
Index: modules/openid/openid.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.pages.inc,v
retrieving revision 1.24
diff -u -r1.24 openid.pages.inc
--- modules/openid/openid.pages.inc	4 Nov 2009 04:56:54 -0000	1.24
+++ modules/openid/openid.pages.inc	10 Dec 2009 20:16:56 -0000
@@ -73,7 +73,11 @@
     '#type' => 'textfield',
     '#title' => t('OpenID'),
   );
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Add an OpenID'));
+  $form['actions'] = array(
+    '#type' => 'container',
+    '#attributes' => array('class' => array('form-actions')),
+  );
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Add an OpenID'));
   return $form;
 }
 
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.228
diff -u -r1.228 install.php
--- install.php	7 Dec 2009 06:19:20 -0000	1.228
+++ install.php	10 Dec 2009 20:16:56 -0000
@@ -918,7 +918,8 @@
       '#description' => st('If more than one application will be sharing this database, enter a table prefix such as %prefix for your @drupal site here.', array('@drupal' => drupal_install_profile_distribution_name(), '%prefix' => $db_prefix)),
     );
 
-    $form['save'] = array(
+    $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+    $form['actions']['save'] = array(
       '#type' => 'submit',
       '#value' => st('Save and continue'),
     );
@@ -1130,7 +1131,8 @@
       '#parents' => array('profile'),
     );
   }
-  $form['submit'] =  array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] =  array(
     '#type' => 'submit',
     '#value' => st('Save and continue'),
   );
@@ -1260,7 +1262,8 @@
       '#markup' => '<p><a href="install.php?profile=' . $profilename . '&amp;localize=true">' . st('Learn how to install Drupal in other languages') . '</a></p>',
     );
   }
-  $form['submit'] =  array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] =  array(
     '#type' => 'submit',
     '#value' => st('Save and continue'),
   );
@@ -1668,7 +1671,8 @@
     '#weight' => 15,
   );
 
-  $form['submit'] = array(
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => st('Save and continue'),
     '#weight' => 15,
Index: modules/menu/menu.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v
retrieving revision 1.68
diff -u -r1.68 menu.admin.inc
--- modules/menu/menu.admin.inc	4 Nov 2009 04:43:58 -0000	1.68
+++ modules/menu/menu.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -63,8 +63,10 @@
 
   $form = array_merge($form, _menu_overview_tree_form($tree));
   $form['#menu'] =  $menu;
+  
   if (element_children($form)) {
-    $form['submit'] = array(
+    $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+    $form['actions']['submit'] = array(
       '#type' => 'submit',
       '#value' => t('Save configuration'),
     );
Index: modules/field_ui/field_ui.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field_ui/field_ui.admin.inc,v
retrieving revision 1.31
diff -u -r1.31 field_ui.admin.inc
--- modules/field_ui/field_ui.admin.inc	2 Dec 2009 19:26:22 -0000	1.31
+++ modules/field_ui/field_ui.admin.inc	10 Dec 2009 20:16:56 -0000
@@ -865,7 +865,8 @@
   $form['#object_type'] = $obj_type;
   $form['#bundle'] = $bundle;
 
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Save field settings'));
+  $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions')));
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save field settings'));
   return $form;
 }
 
Index: modules/field_ui/field_ui.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field_ui/field_ui.module,v
retrieving revision 1.18
diff -u -r1.18 field_ui.module
--- modules/field_ui/field_ui.module	6 Dec 2009 18:51:43 -0000	1.18
+++ modules/field_ui/field_ui.module	10 Dec 2009 20:16:56 -0000
@@ -313,7 +313,7 @@
 function field_ui_form_node_type_form_alter(&$form, $form_state) {
   // We want to display the button only on add page.
   if (empty($form['#node_type']->type)) {
-    $form['save_continue'] = array(
+    $form['actions']['save_continue'] = array(
       '#type' => 'submit',
       '#value' => t('Save and add fields'),
       '#weight' => 45,
