Index: update.php =================================================================== RCS file: /cvs/drupal/drupal/update.php,v retrieving revision 1.319 diff -u -p -r1.319 update.php --- update.php 11 Apr 2010 18:33:43 -0000 1.319 +++ update.php 23 Apr 2010 01:39:36 -0000 @@ -129,7 +129,8 @@ function update_script_selection_form($f '#type' => 'hidden', '#default_value' => FALSE, ); - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => 'Apply pending updates', ); Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.452 diff -u -p -r1.452 form.inc --- includes/form.inc 13 Apr 2010 15:23:02 -0000 1.452 +++ includes/form.inc 23 Apr 2010 01:52:09 -0000 @@ -1224,7 +1224,7 @@ function form_builder($form_id, $element $element['#processed'] = FALSE; // Use element defaults. - if (isset($element['#type']) && ($info = element_info($element['#type']))) { + if (isset($element['#type']) && empty($element['#defaults_loaded']) && ($info = element_info($element['#type']))) { // Overlay $info onto $element, retaining preexisting keys in $element. $element += $info; $element['#defaults_loaded'] = TRUE; @@ -1302,6 +1302,12 @@ function form_builder($form_id, $element $array_parents[] = $key; $element[$key]['#array_parents'] = $array_parents; + // Prior to handling #weight, default element properties need to be applied. + if (isset($element[$key]['#type']) && empty($element[$key]['#defaults_loaded']) && ($info = element_info($element[$key]['#type']))) { + $element[$key] += $info; + $element[$key]['#defaults_loaded'] = TRUE; + } + // Assign a decimal placeholder weight to preserve original array order. if (!isset($element[$key]['#weight'])) { $element[$key]['#weight'] = $count/1000; @@ -2416,6 +2422,23 @@ function form_process_checkboxes($elemen } /** + * Processes a form actions container element. + * + * @param $element + * An associative array containing the properties and children of the + * form actions container. + * @param $form_state + * The $form_state array for the form this element belongs to. + * + * @return + * The processed element. + */ +function form_process_actions($element, &$form_state) { + $element['#attributes']['class'][] = 'form-actions'; + return $element; +} + +/** * Processes a container element. * * @param $element Index: includes/install.core.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.core.inc,v retrieving revision 1.11 diff -u -p -r1.11 install.core.inc --- includes/install.core.inc 22 Apr 2010 09:13:53 -0000 1.11 +++ includes/install.core.inc 23 Apr 2010 01:34:30 -0000 @@ -922,7 +922,7 @@ function install_settings_form($form, &$ '#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['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['save'] = array( '#type' => 'submit', '#value' => st('Save and continue'), @@ -1140,7 +1140,7 @@ function install_select_profile_form($fo '#parents' => array('profile'), ); } - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), @@ -1274,7 +1274,7 @@ function install_select_locale_form($for '#markup' => '

' . st('Learn how to install Drupal in other languages') . '

', ); } - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), @@ -1683,7 +1683,7 @@ function _install_configure_form($form, '#weight' => 15, ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), Index: modules/aggregator/aggregator.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v retrieving revision 1.50 diff -u -p -r1.50 aggregator.admin.inc --- modules/aggregator/aggregator.admin.inc 27 Feb 2010 15:05:19 -0000 1.50 +++ modules/aggregator/aggregator.admin.inc 23 Apr 2010 01:41:13 -0000 @@ -109,13 +109,14 @@ function aggregator_form_feed($form, &$f '#description' => t('New feed items are automatically filed in the checked categories.'), ); } - $form['submit'] = array( + + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); - if (!empty($feed->fid)) { - $form['delete'] = array( + $form['actions']['delete'] = array( '#type' => 'submit', '#value' => t('Delete'), ); @@ -270,7 +271,8 @@ function aggregator_form_opml($form, &$f '#description' => t('New feed items are automatically filed in the checked categories.'), ); } - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Import') ); @@ -478,7 +480,7 @@ function aggregator_admin_form($form, $f // Implementing modules will expect an array at $form['modules']. $form['modules'] = array(); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save configuration'), @@ -510,10 +512,10 @@ function aggregator_form_category($form, '#title' => t('Description'), '#default_value' => $edit['description'], ); - $form['submit'] = array('#type' => 'submit', '#value' => t('Save')); - + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save')); if ($edit['cid']) { - $form['delete'] = array('#type' => 'submit', '#value' => t('Delete')); + $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete')); $form['cid'] = array('#type' => 'hidden', '#value' => $edit['cid']); } Index: modules/aggregator/aggregator.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.pages.inc,v retrieving revision 1.41 diff -u -p -r1.41 aggregator.pages.inc --- modules/aggregator/aggregator.pages.inc 13 Apr 2010 15:23:02 -0000 1.41 +++ modules/aggregator/aggregator.pages.inc 23 Apr 2010 01:34:30 -0000 @@ -199,7 +199,7 @@ function aggregator_categorize_items($it '#multiple' => TRUE ); } - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save categories')); return $form; Index: modules/block/block.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v retrieving revision 1.76 diff -u -p -r1.76 block.admin.inc --- modules/block/block.admin.inc 28 Mar 2010 11:16:29 -0000 1.76 +++ modules/block/block.admin.inc 23 Apr 2010 01:34:30 -0000 @@ -104,8 +104,7 @@ function block_admin_display_form($form, $form['actions'] = array( '#tree' => FALSE, - '#type' => 'container', - '#attributes' => array('class' => array('form-actions')), + '#type' => 'actions', ); $form['actions']['submit'] = array( '#type' => 'submit', @@ -351,7 +350,7 @@ function block_admin_configure($form, &$ '#default_value' => isset($block->custom) ? $block->custom : 0, ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save block'), Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.869 diff -u -p -r1.869 comment.module --- modules/comment/comment.module 22 Apr 2010 10:12:25 -0000 1.869 +++ modules/comment/comment.module 23 Apr 2010 01:35:16 -0000 @@ -1906,11 +1906,7 @@ function comment_form($form, &$form_stat // 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['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions')), - '#weight' => 100, - ); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), Index: modules/contact/contact.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.admin.inc,v retrieving revision 1.23 diff -u -p -r1.23 contact.admin.inc --- modules/contact/contact.admin.inc 26 Feb 2010 18:35:35 -0000 1.23 +++ modules/contact/contact.admin.inc 23 Apr 2010 01:34:30 -0000 @@ -108,10 +108,7 @@ function contact_category_edit_form($for '#type' => 'value', '#value' => $category['cid'], ); - $form['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions')), - ); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), Index: modules/contact/contact.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v retrieving revision 1.42 diff -u -p -r1.42 contact.pages.inc --- modules/contact/contact.pages.inc 7 Apr 2010 16:35:03 -0000 1.42 +++ modules/contact/contact.pages.inc 23 Apr 2010 01:34:30 -0000 @@ -101,10 +101,7 @@ function contact_site_form($form, &$form '#title' => t('Send yourself a copy.'), '#access' => $user->uid, ); - $form['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions')), - ); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Send message'), @@ -235,10 +232,7 @@ function contact_personal_form($form, &$ '#title' => t('Send yourself a copy.'), '#access' => $user->uid, ); - $form['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions')), - ); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Send message'), Index: modules/dblog/dblog.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v retrieving revision 1.38 diff -u -p -r1.38 dblog.admin.inc --- modules/dblog/dblog.admin.inc 13 Apr 2010 15:23:02 -0000 1.38 +++ modules/dblog/dblog.admin.inc 23 Apr 2010 01:34:30 -0000 @@ -312,8 +312,8 @@ function dblog_filter_form($form) { } $form['filters']['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions', 'container-inline')), + '#type' => 'actions', + '#attributes' => array('class' => array('container-inline')), ); $form['filters']['actions']['submit'] = array( '#type' => 'submit', Index: modules/field_ui/field_ui.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/field_ui/field_ui.admin.inc,v retrieving revision 1.48 diff -u -p -r1.48 field_ui.admin.inc --- modules/field_ui/field_ui.admin.inc 11 Apr 2010 18:33:43 -0000 1.48 +++ modules/field_ui/field_ui.admin.inc 23 Apr 2010 01:42:52 -0000 @@ -274,7 +274,8 @@ function field_ui_field_overview_form($f $form['#field_rows'][] = $name; } - $form['submit'] = array('#type' => 'submit', '#value' => t('Save')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save')); return $form; } @@ -624,7 +625,8 @@ function field_ui_display_overview_form( } } - $form['submit'] = array('#type' => 'submit', '#value' => t('Save')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save')); return $form; } @@ -859,7 +861,7 @@ function field_ui_field_settings_form($f $form['#entity_type'] = $entity_type; $form['#bundle'] = $bundle; - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save field settings')); return $form; } @@ -922,7 +924,8 @@ function field_ui_widget_type_form($form ); $form['#instance'] = $instance; - $form['submit'] = array('#type' => 'submit', '#value' => t('Continue')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Continue')); $form['#validate'] = array(); $form['#submit'] = array('field_ui_widget_type_form_submit'); @@ -1160,7 +1163,8 @@ function field_ui_field_edit_form($form, $form['field']['settings'] = $additions; } - $form['submit'] = array('#type' => 'submit', '#value' => t('Save settings')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save settings')); return $form; } Index: modules/filter/filter.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v retrieving revision 1.59 diff -u -p -r1.59 filter.admin.inc --- modules/filter/filter.admin.inc 13 Apr 2010 15:23:03 -0000 1.59 +++ modules/filter/filter.admin.inc 23 Apr 2010 01:34:30 -0000 @@ -36,7 +36,7 @@ function filter_admin_overview($form) { $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['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save changes')); return $form; } @@ -230,7 +230,7 @@ function filter_admin_format_form($form, if (!empty($format->format)) { $form['format'] = array('#type' => 'value', '#value' => $format->format); } - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration')); return $form; Index: modules/forum/forum.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/forum/forum.admin.inc,v retrieving revision 1.32 diff -u -p -r1.32 forum.admin.inc --- modules/forum/forum.admin.inc 13 Apr 2010 15:23:03 -0000 1.32 +++ modules/forum/forum.admin.inc 23 Apr 2010 01:34:30 -0000 @@ -55,7 +55,7 @@ function forum_form_forum($form, &$form_ ); $form['vid'] = array('#type' => 'hidden', '#value' => variable_get('forum_nav_vocabulary', '')); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit' ] = array('#type' => 'submit', '#value' => t('Save')); if ($edit['tid']) { $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete')); @@ -160,7 +160,7 @@ function forum_form_container($form, &$f '#type' => 'hidden', '#value' => variable_get('forum_nav_vocabulary', ''), ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save') Index: modules/image/image.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/image/image.admin.inc,v retrieving revision 1.19 diff -u -p -r1.19 image.admin.inc --- modules/image/image.admin.inc 22 Apr 2010 21:43:59 -0000 1.19 +++ modules/image/image.admin.inc 23 Apr 2010 01:43:28 -0000 @@ -141,14 +141,15 @@ function image_style_form($form, &$form_ ); // Show the Override or Submit button for this style. - $form['override'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['override'] = array( '#type' => 'submit', '#value' => t('Override defaults'), '#validate' => array(), '#submit' => array('image_style_form_override_submit'), '#access' => !$editable, ); - $form['submit'] = array( + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Update style'), '#access' => $editable, @@ -393,7 +394,7 @@ function image_effect_form($form, &$form '#value' => isset($_GET['weight']) ? intval($_GET['weight']) : (isset($effect['weight']) ? $effect['weight'] : count($style['effects'])), ); - $form['actions'] = array('#tree' => FALSE, '#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#tree' => FALSE, '#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => isset($effect['ieid']) ? t('Update effect') : t('Add effect'), Index: modules/locale/locale.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.admin.inc,v retrieving revision 1.11 diff -u -p -r1.11 locale.admin.inc --- modules/locale/locale.admin.inc 13 Apr 2010 15:23:03 -0000 1.11 +++ modules/locale/locale.admin.inc 23 Apr 2010 01:44:08 -0000 @@ -43,7 +43,7 @@ function locale_languages_overview_form( '#options' => $options, '#default_value' => language_default('language'), ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration')); $form['#theme'] = 'locale_languages_overview_form'; @@ -168,7 +168,7 @@ function locale_languages_predefined_for '#options' => $predefined, '#description' => t('Use the Custom language section below if your desired language does not appear in this list.'), ); - $form['language list']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['language list']['actions'] = array('#type' => 'actions'); $form['language list']['actions']['submit'] = array('#type' => 'submit', '#value' => t('Add language')); return $form; } @@ -183,7 +183,7 @@ function locale_languages_custom_form($f '#collapsed' => TRUE, ); _locale_languages_common_controls($form['custom language']); - $form['custom language']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['custom language']['actions'] = array('#type' => 'actions'); $form['custom language']['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Add custom language') @@ -203,7 +203,7 @@ function locale_languages_custom_form($f 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['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save language') @@ -483,7 +483,7 @@ function locale_languages_configure_form _locale_languages_configure_form_language_table($form, $type); } - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save settings'), @@ -862,7 +862,10 @@ function locale_translation_filter_form( } } - $form['filters']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions', 'container-inline'))); + $form['filters']['actions'] = array( + '#type' => 'actions', + '#attributes' => array('class' => array('container-inline')), + ); $form['filters']['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Filter'), @@ -1053,7 +1056,8 @@ function locale_translate_export_po_form '#default_value' => 'default', '#options' => module_invoke_all('locale', 'groups'), ); - $form['submit'] = array('#type' => 'submit', '#value' => t('Export')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Export')); return $form; } @@ -1071,7 +1075,8 @@ function locale_translate_export_pot_for '#default_value' => 'default', '#options' => module_invoke_all('locale', 'groups'), ); - $form['submit'] = array('#type' => 'submit', '#value' => t('Export')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Export')); // Reuse PO export submission callback. $form['#submit'][] = 'locale_translate_export_po_form_submit'; return $form; @@ -1160,7 +1165,8 @@ function locale_translate_edit_form($for $form['translations'][$translation->language]['#default_value'] = $translation->translation; } - $form['submit'] = array('#type' => 'submit', '#value' => t('Save translations')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save translations')); return $form; } @@ -1385,7 +1391,7 @@ function locale_date_format_form($form, ); } - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save configuration'), Index: modules/menu/menu.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v retrieving revision 1.77 diff -u -p -r1.77 menu.admin.inc --- modules/menu/menu.admin.inc 13 Apr 2010 15:23:03 -0000 1.77 +++ modules/menu/menu.admin.inc 23 Apr 2010 01:44:31 -0000 @@ -72,7 +72,7 @@ function menu_overview_form($form, &$for $form['#menu'] = $menu; if (element_children($form)) { - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save configuration'), @@ -339,7 +339,8 @@ function menu_edit_item($form, &$form_st '#default_value' => $item['weight'], '#description' => t('Optional. In the menu, the heavier links will sink and the lighter links will be positioned nearer the top.'), ); - $form['submit'] = array('#type' => 'submit', '#value' => t('Save')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save')); return $form; } @@ -467,12 +468,13 @@ function menu_edit_menu($form, &$form_st '#title' => t('Description'), '#default_value' => $menu['description'], ); - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); // Only custom menus may be deleted. - $form['delete'] = array( + $form['actions']['delete'] = array( '#type' => 'submit', '#value' => t('Delete'), '#access' => $type == 'edit' && !isset($system_menus[$menu['menu_name']]), Index: modules/node/content_types.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v retrieving revision 1.111 diff -u -p -r1.111 content_types.inc --- modules/node/content_types.inc 13 Apr 2010 15:23:03 -0000 1.111 +++ modules/node/content_types.inc 23 Apr 2010 01:34:30 -0000 @@ -245,7 +245,7 @@ function node_type_form($form, &$form_st '#value' => $type->locked, ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save content type'), Index: modules/node/node.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v retrieving revision 1.93 diff -u -p -r1.93 node.admin.inc --- modules/node/node.admin.inc 13 Apr 2010 15:23:03 -0000 1.93 +++ modules/node/node.admin.inc 23 Apr 2010 01:34:30 -0000 @@ -188,9 +188,9 @@ function node_filter_form() { } $form['filters']['actions'] = array( - '#type' => 'container', + '#type' => 'actions', '#id' => 'node-admin-buttons', - '#attributes' => array('class' => array('form-actions', 'container-inline')), + '#attributes' => array('class' => array('container-inline')), ); $form['filters']['actions']['submit'] = array('#type' => 'submit', '#value' => (count($session) ? t('Refine') : t('Filter'))); if (count($session)) { Index: modules/node/node.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v retrieving revision 1.122 diff -u -p -r1.122 node.pages.inc --- modules/node/node.pages.inc 13 Apr 2010 15:23:03 -0000 1.122 +++ modules/node/node.pages.inc 23 Apr 2010 01:34:30 -0000 @@ -247,11 +247,7 @@ function node_form($form, &$form_state, ); // Add the buttons. - $form['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions')), - '#weight' => 100, - ); + $form['actions'] = array('#type' => 'actions'); $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'])), Index: modules/openid/openid.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/openid/openid.inc,v retrieving revision 1.30 diff -u -p -r1.30 openid.inc --- modules/openid/openid.inc 11 Apr 2010 18:33:44 -0000 1.30 +++ modules/openid/openid.inc 23 Apr 2010 01:44:47 -0000 @@ -109,7 +109,8 @@ function openid_redirect_form($form, &$f '#value' => $value, ); } - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#prefix' => '', Index: modules/openid/openid.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/openid/openid.pages.inc,v retrieving revision 1.27 diff -u -p -r1.27 openid.pages.inc --- modules/openid/openid.pages.inc 2 Mar 2010 08:59:54 -0000 1.27 +++ modules/openid/openid.pages.inc 23 Apr 2010 01:34:30 -0000 @@ -73,7 +73,7 @@ function openid_user_add() { '#type' => 'textfield', '#title' => t('OpenID'), ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Add an OpenID')); return $form; } Index: modules/path/path.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v retrieving revision 1.42 diff -u -p -r1.42 path.admin.inc --- modules/path/path.admin.inc 3 Mar 2010 19:46:25 -0000 1.42 +++ modules/path/path.admin.inc 23 Apr 2010 01:34:30 -0000 @@ -122,10 +122,7 @@ function path_admin_form($form, &$form_s '#value' => $path['language'] ); - $form['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions')), - ); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), Index: modules/poll/poll.module =================================================================== RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v retrieving revision 1.344 diff -u -p -r1.344 poll.module --- modules/poll/poll.module 22 Apr 2010 23:59:04 -0000 1.344 +++ modules/poll/poll.module 23 Apr 2010 01:44:57 -0000 @@ -894,7 +894,8 @@ function poll_cancel_form($form, &$form_ // Store the nid so we can get to it in submit functions. $form['#nid'] = $nid; - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Cancel your vote'), '#submit' => array('poll_cancel') Index: modules/profile/profile.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v retrieving revision 1.40 diff -u -p -r1.40 profile.admin.inc --- modules/profile/profile.admin.inc 13 Apr 2010 15:23:03 -0000 1.40 +++ modules/profile/profile.admin.inc 23 Apr 2010 01:46:11 -0000 @@ -40,7 +40,8 @@ function profile_admin_overview($form) { // Display the submit button only when there's more than one field if (count($form) > 1) { - $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration')); } else { // Disable combo boxes when there isn't a submit button @@ -105,7 +106,7 @@ function theme_profile_admin_overview($v drupal_add_css(drupal_get_path('module', 'profile') . '/profile.css'); // Add javascript if there's more than one field. - if (isset($form['submit'])) { + if (isset($form['actions'])) { drupal_add_js(drupal_get_path('module', 'profile') . '/profile.js'); } @@ -127,7 +128,7 @@ function theme_profile_admin_overview($v $rows[] = array('data' => array(array('data' => '' . t('No fields in this category. If this category remains empty when saved, it will be removed.') . '', 'colspan' => 7)), 'class' => array('category-' . $category_number . '-message', 'category-message', 'category-populated')); // Make it draggable only if there is more than one field - if (isset($form['submit'])) { + if (isset($form['actions'])) { drupal_add_tabledrag('profile-fields', 'order', 'sibling', 'profile-weight', 'profile-weight-' . $category_number); drupal_add_tabledrag('profile-fields', 'match', 'sibling', 'profile-category', 'profile-category-' . $category_number); } @@ -143,7 +144,7 @@ function theme_profile_admin_overview($v $row[] = drupal_render($field['title']); $row[] = drupal_render($field['name']); $row[] = drupal_render($field['type']); - if (isset($form['submit'])) { + if (isset($form['actions'])) { $row[] = drupal_render($field['category']); $row[] = drupal_render($field['weight']); } @@ -154,7 +155,7 @@ function theme_profile_admin_overview($v } $header = array(t('Title'), t('Name'), t('Type')); - if (isset($form['submit'])) { + if (isset($form['actions'])) { $header[] = t('Category'); $header[] = t('Weight'); } @@ -286,7 +287,7 @@ Unless you know what you are doing, it i '#default_value' => $edit['register'], ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save field'), ); Index: modules/search/search.module =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search.module,v retrieving revision 1.344 diff -u -p -r1.344 search.module --- modules/search/search.module 11 Apr 2010 18:54:11 -0000 1.344 +++ modules/search/search.module 23 Apr 2010 01:46:27 -0000 @@ -935,7 +935,8 @@ function search_box($form, &$form_state, '#default_value' => '', '#attributes' => array('title' => t('Enter the terms you wish to search for.')), ); - $form['submit'] = array('#type' => 'submit', '#value' => t('Search')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Search')); $form['#submit'][] = 'search_box_form_submit'; return $form; Index: modules/shortcut/shortcut.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/shortcut/shortcut.admin.inc,v retrieving revision 1.12 diff -u -p -r1.12 shortcut.admin.inc --- modules/shortcut/shortcut.admin.inc 13 Apr 2010 15:23:03 -0000 1.12 +++ modules/shortcut/shortcut.admin.inc 23 Apr 2010 01:34:30 -0000 @@ -85,7 +85,7 @@ function shortcut_set_switch($form, &$fo 'js' => array(drupal_get_path('module', 'shortcut') . '/shortcut.admin.js'), ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Change set'), @@ -193,7 +193,7 @@ function shortcut_set_add_form($form, &$ '#description' => t('The new set is created by copying items from your default shortcut set.'), ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Create new set'), @@ -269,7 +269,7 @@ function shortcut_set_customize($form, & 'js' => array(drupal_get_path('module', 'shortcut') . '/shortcut.admin.js'), ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save changes'), @@ -453,7 +453,7 @@ function _shortcut_link_form_elements($s $form['#validate'][] = 'shortcut_link_edit_validate'; - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), @@ -562,11 +562,7 @@ function shortcut_set_edit_form($form, & '#required' => TRUE, '#weight' => -5, ); - $form['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions')), - '#weight' => 100, - ); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.268 diff -u -p -r1.268 system.admin.inc --- modules/system/system.admin.inc 22 Apr 2010 09:54:26 -0000 1.268 +++ modules/system/system.admin.inc 23 Apr 2010 01:46:50 -0000 @@ -345,7 +345,7 @@ function system_themes_admin_form($form, '#title' => t('Use the administration theme when editing or creating content'), '#default_value' => variable_get('node_admin_theme', '0'), ); - $form['admin_theme']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['admin_theme']['actions'] = array('#type' => 'actions'); $form['admin_theme']['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save configuration'), @@ -950,7 +950,7 @@ function system_modules($form, $form_sta ); } - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save configuration'), @@ -1307,7 +1307,7 @@ function system_modules_uninstall($form, '#type' => 'checkboxes', '#options' => $options, ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Uninstall'), @@ -1439,7 +1439,8 @@ function system_ip_blocking_form($form, '#default_value' => $default_ip, '#description' => t('Enter a valid IP address.'), ); - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); @@ -2076,7 +2077,8 @@ function system_add_date_format_type_for '#required' => TRUE, ); - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Add date type'), ); @@ -2779,7 +2781,7 @@ function system_configure_date_formats_f ), ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['update'] = array( '#type' => 'submit', '#value' => ($dfid ? t('Save format') : t('Add format')), @@ -2906,7 +2908,7 @@ function system_actions_manage_form($for '#options' => $options, '#description' => '', ); - $form['parent']['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['parent']['actions'] = array('#type' => 'actions'); $form['parent']['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Create'), @@ -3003,7 +3005,7 @@ function system_actions_configure($form, '#type' => 'hidden', '#value' => '1', ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.922 diff -u -p -r1.922 system.module --- modules/system/system.module 22 Apr 2010 07:36:50 -0000 1.922 +++ modules/system/system.module 23 Apr 2010 01:34:30 -0000 @@ -472,6 +472,11 @@ function system_element_info() { '#theme_wrappers' => array('container'), '#process' => array('form_process_container'), ); + $types['actions'] = array( + '#theme_wrappers' => array('container'), + '#process' => array('form_process_actions', 'form_process_container'), + '#weight' => 100, + ); $types['token'] = array( '#input' => TRUE, @@ -2575,9 +2580,7 @@ function _system_settings_form_automatic * @ingroup forms */ function system_settings_form($form, $automatic_defaults = TRUE) { - $form['actions']['#type'] = 'container'; - $form['actions']['#attributes']['class'][] = 'form-actions'; - $form['actions']['#weight'] = 100; + $form['actions']['#type'] = 'actions'; $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration')); if ($automatic_defaults) { @@ -2690,8 +2693,8 @@ function confirm_form($form, $question, $form[$name] = array('#type' => 'hidden', '#value' => 1); $form['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions', 'container-inline')), + '#type' => 'actions', + '#attributes' => array('class' => array('container-inline')), ); $form['actions']['submit'] = array('#type' => 'submit', '#value' => $yes ? $yes : t('Confirm')); $form['actions']['cancel'] = array('#markup' => $cancel); Index: modules/taxonomy/taxonomy.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v retrieving revision 1.101 diff -u -p -r1.101 taxonomy.admin.inc --- modules/taxonomy/taxonomy.admin.inc 13 Apr 2010 15:23:03 -0000 1.101 +++ modules/taxonomy/taxonomy.admin.inc 23 Apr 2010 01:47:47 -0000 @@ -28,7 +28,8 @@ function taxonomy_overview_vocabularies( // Only make this form include a submit button and weight if more than one // vocabulary exists. if (count($vocabularies) > 1) { - $form['submit'] = array('#type' => 'submit', '#value' => t('Save')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save')); } elseif (isset($vocabulary)) { unset($form[$vocabulary->vid]['weight']); @@ -84,7 +85,7 @@ function theme_taxonomy_overview_vocabul } $header = array(t('Vocabulary name')); - if (isset($form['submit'])) { + if (isset($form['actions'])) { $header[] = t('Weight'); drupal_add_tabledrag('taxonomy', 'order', 'sibling', 'vocabulary-weight'); } @@ -158,9 +159,10 @@ function taxonomy_form_vocabulary($form, '#value' => '0', ); - $form['submit'] = array('#type' => 'submit', '#value' => t('Save')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save')); if (isset($edit['vid'])) { - $form['delete'] = array('#type' => 'submit', '#value' => t('Delete')); + $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete')); $form['vid'] = array('#type' => 'value', '#value' => $edit['vid']); $form['module'] = array('#type' => 'value', '#value' => $edit['module']); } @@ -385,11 +387,12 @@ function taxonomy_overview_terms($form, $form['#empty_text'] = t('No terms available. Add term.', array('@link' => url('admin/structure/taxonomy/' . $vocabulary->machine_name . '/add'))); if ($vocabulary->hierarchy < 2 && count($tree) > 1) { - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save') ); - $form['reset_alphabetical'] = array( + $form['actions']['reset_alphabetical'] = array( '#type' => 'submit', '#value' => t('Reset to alphabetical') ); @@ -728,11 +731,7 @@ function taxonomy_form_term($form, &$for '#value' => $edit['tid'], ); - $form['actions'] = array( - '#type' => 'container', - '#attributes' => array('class' => array('form-actions')), - '#weight' => 100, - ); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), Index: modules/update/update.manager.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.manager.inc,v retrieving revision 1.20 diff -u -p -r1.20 update.manager.inc --- modules/update/update.manager.inc 15 Apr 2010 12:28:13 -0000 1.20 +++ modules/update/update.manager.inc 23 Apr 2010 01:48:35 -0000 @@ -230,10 +230,10 @@ function update_manager_update_form($for // If either table has been printed yet, we need a submit button and to // validate the checkboxes. if (!empty($projects['enabled']) || !empty($projects['disabled'])) { - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Download these updates'), - '#weight' => 10, ); $form['#validate'][] = 'update_manager_update_form_validate'; } @@ -245,7 +245,7 @@ function update_manager_update_form($for '#type' => 'markup', '#markup' => theme('table', array('header' => $headers, 'rows' => $projects['manual'])), '#prefix' => $prefix, - '#weight' => 20, + '#weight' => 120, ); } @@ -365,10 +365,10 @@ function update_manager_update_ready_for '#default_value' => TRUE, ); - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Continue'), - '#weight' => 100, ); return $form; @@ -491,7 +491,8 @@ function update_manager_install_form($fo '#description' => t('For example: %filename from your local computer', array('%filename' => 'name.tar.gz')), ); - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Install'), ); Index: modules/user/user.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v retrieving revision 1.106 diff -u -p -r1.106 user.admin.inc --- modules/user/user.admin.inc 13 Apr 2010 15:23:03 -0000 1.106 +++ modules/user/user.admin.inc 23 Apr 2010 01:49:22 -0000 @@ -73,9 +73,9 @@ function user_filter_form() { } $form['filters']['actions'] = array( - '#type' => 'container', + '#type' => 'actions', '#id' => 'user-admin-buttons', - '#attributes' => array('class' => array('form-actions', 'container-inline')), + '#attributes' => array('class' => array('container-inline')), ); $form['filters']['actions']['submit'] = array( '#type' => 'submit', @@ -708,7 +708,7 @@ function user_admin_permissions($form, $ $form['role_names'][$rid] = array('#markup' => $name, '#tree' => TRUE); } - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save permissions')); $form['#attached']['js'][] = drupal_get_path('module', 'user') . '/user.permissions.js'; @@ -844,7 +844,8 @@ function user_admin_roles($form, $form_s '#validate' => array('user_admin_role_validate'), '#submit' => array('user_admin_role_submit'), ); - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save order'), '#submit' => array('user_admin_roles_order_submit'), @@ -934,7 +935,7 @@ function user_admin_role($form, $form_st '#type' => 'value', '#value' => $role->weight, ); - $form['actions'] = array('#type' => 'container', '#attributes' => array('class' => array('form-actions'))); + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save role'), Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.1160 diff -u -p -r1.1160 user.module --- modules/user/user.module 20 Apr 2010 08:25:30 -0000 1.1160 +++ modules/user/user.module 23 Apr 2010 01:50:10 -0000 @@ -1165,7 +1165,8 @@ function user_login_block($form) { '#size' => 15, '#required' => TRUE, ); - $form['submit'] = array('#type' => 'submit', + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Log in'), ); $items = array(); @@ -1829,7 +1830,8 @@ function user_login($form, &$form_state) '#required' => TRUE, ); $form['#validate'] = user_login_default_validators(); - $form['submit'] = array('#type' => 'submit', '#value' => t('Log in'), '#weight' => 2); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Log in')); return $form; } @@ -3357,10 +3359,10 @@ function user_register_form($form, &$for $form_state['redirect'] = $_GET['q']; } - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Create new account'), - '#weight' => 30, ); // Add the final user registration form submit handler. Index: modules/user/user.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v retrieving revision 1.69 diff -u -p -r1.69 user.pages.inc --- modules/user/user.pages.inc 13 Apr 2010 15:13:41 -0000 1.69 +++ modules/user/user.pages.inc 23 Apr 2010 01:50:53 -0000 @@ -48,7 +48,8 @@ function user_pass() { '#suffix' => '

', ); } - $form['submit'] = array('#type' => 'submit', '#value' => t('E-mail new password')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('E-mail new password')); return $form; } @@ -140,7 +141,8 @@ function user_pass_reset($form, &$form_s else { $form['message'] = array('#markup' => t('

This is a one-time login for %user_name and will expire on %expiration_date.

Click on this button to log in to the site and change your password.

', array('%user_name' => $account->name, '%expiration_date' => format_date($timestamp + $timeout)))); $form['help'] = array('#markup' => '

' . t('This login can be used only once.') . '

'); - $form['submit'] = array('#type' => 'submit', '#value' => t('Log in')); + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Log in')); $form['#action'] = url("user/reset/$uid/$timestamp/$hashed_pass/login"); return $form; } @@ -251,16 +253,15 @@ function user_profile_form($form, &$form // Attach field widgets. field_attach_form('user', $account, $form, $form_state); - $form['submit'] = array( + $form['actions'] = array('#type' => 'actions'); + $form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save'), - '#weight' => 30, ); if ($category == 'account') { - $form['cancel'] = array( + $form['actions']['cancel'] = array( '#type' => 'submit', '#value' => t('Cancel account'), - '#weight' => 31, '#submit' => array('user_edit_cancel_submit'), '#access' => $account->uid > 1 && (($account->uid == $user->uid && user_access('cancel account')) || user_access('administer users')), );