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/taxonomy/taxonomy.admin.inc | |
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/taxonomy/taxonomy.admin.inc')
-rw-r--r-- | modules/taxonomy/taxonomy.admin.inc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc index b8b6b3b5f..5cdc22b51 100644 --- a/modules/taxonomy/taxonomy.admin.inc +++ b/modules/taxonomy/taxonomy.admin.inc @@ -28,7 +28,8 @@ function taxonomy_overview_vocabularies($form) { // 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_vocabularies($variables) { } $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, &$form_state, $edit = array()) { '#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_state, $vocabulary) { $form['#empty_text'] = t('No terms available. <a href="@link">Add term</a>.', 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', '#tree' => FALSE); + $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, &$form_state, $edit = array(), $vocabulary = '#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'), |