diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-04-24 14:49:14 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-04-24 14:49:14 +0000 |
commit | 45f4a1e166d090e23cb385c3238835fce61d1607 (patch) | |
tree | 63384d78144e0caee7c6700c44e444a70fc58845 /modules/system | |
parent | 3e547ae045849264745f8cc456a0f379246060ea (diff) | |
download | brdo-45f4a1e166d090e23cb385c3238835fce61d1607.tar.gz brdo-45f4a1e166d090e23cb385c3238835fce61d1607.tar.bz2 |
- Patch #482816 by sun, Rob Loach: make 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 | 13 |
2 files changed, 18 insertions, 13 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index aa70243e0..277fc3d70 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -345,7 +345,7 @@ 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']['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_state = 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'), @@ -1307,7 +1307,7 @@ function system_modules_uninstall($form, $form_state = NULL) { '#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, $form_state, $default_ip) { '#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_form($form, &$form_state) { '#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_form($form, &$form_state, $dfid = 0) { ), ); - $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($form, &$form_state, $options = array()) { '#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, &$form_state, $action = NULL) { '#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'), diff --git a/modules/system/system.module b/modules/system/system.module index 1e526fcb0..a33807dfd 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -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_defaults($form) { * @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, $path, $description = NULL, $yes = NULL, $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); |