diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-03 21:01:04 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-03 21:01:04 +0000 |
commit | ba6ef3017eb8ac1e6ccfd1ffebf97a476859315d (patch) | |
tree | 8d9f52358a4c0118b07a03d437c7d5dfe290999c /modules/system | |
parent | 8c4b6239b48a46e754e23a803f4a28745b4eb027 (diff) | |
download | brdo-ba6ef3017eb8ac1e6ccfd1ffebf97a476859315d.tar.gz brdo-ba6ef3017eb8ac1e6ccfd1ffebf97a476859315d.tar.bz2 |
#482816 by sun and Rob Loach: Add a consistent wrapper around submit buttons.
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.admin.inc | 18 | ||||
-rw-r--r-- | modules/system/system.module | 9 |
2 files changed, 19 insertions, 8 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 9b24c5b43..4097341d9 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -349,7 +349,8 @@ function system_themes_admin_form($form, &$form_state, $theme_options) { '#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'), ); @@ -950,7 +951,8 @@ function system_modules($form, $form_state = 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'), ); @@ -1304,7 +1306,8 @@ function system_modules_uninstall($form, $form_state = NULL) { '#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'), ); @@ -2787,7 +2790,8 @@ function system_configure_date_formats_form($form, &$form_state, $dfid = 0) { ), ); - $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')), ); @@ -2914,7 +2918,8 @@ function system_actions_manage_form($form, &$form_state, $options = array()) { '#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'), ); @@ -3010,7 +3015,8 @@ function system_actions_configure($form, &$form_state, $action = NULL) { '#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 diff --git a/modules/system/system.module b/modules/system/system.module index 6f694eabe..e4edcc4f1 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -2489,7 +2489,9 @@ function _system_settings_form_automatic_defaults($form) { * 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); @@ -2600,7 +2602,10 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL, $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('form-actions', 'container-inline')), + ); $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(). |