summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-01-18 03:33:43 +0000
committerDries Buytaert <dries@buytaert.net>2010-01-18 03:33:43 +0000
commitd7a7ec64e0e10c8238e6d795d90b1fb9a585e535 (patch)
tree8ec5bca951d52ba43e468edf7b89a3d948e12ff1
parentf00065740b4ce4c7d92d110a13746e94baae538e (diff)
downloadbrdo-d7a7ec64e0e10c8238e6d795d90b1fb9a585e535.tar.gz
brdo-d7a7ec64e0e10c8238e6d795d90b1fb9a585e535.tar.bz2
- Patch #678590 by asimmonds, Dave Reid, Damien Tournoud: fixed path alias link being below submit button on taxonomy term add.
-rw-r--r--modules/path/path.module11
-rw-r--r--modules/taxonomy/taxonomy.admin.inc29
2 files changed, 26 insertions, 14 deletions
diff --git a/modules/path/path.module b/modules/path/path.module
index 143e04de8..8f9990300 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -241,12 +241,12 @@ function path_form_taxonomy_form_term_alter(&$form, $form_state) {
'alias' => '',
'language' => LANGUAGE_NONE,
);
- $form['identification']['path'] = array(
+ $form['path'] = array(
'#access' => user_access('create url aliases') || user_access('administer url aliases'),
'#tree' => TRUE,
'#element_validate' => array('path_form_element_validate'),
);
- $form['identification']['path']['alias'] = array(
+ $form['path']['alias'] = array(
'#type' => 'textfield',
'#title' => t('URL alias'),
'#default_value' => $path['alias'],
@@ -254,9 +254,9 @@ function path_form_taxonomy_form_term_alter(&$form, $form_state) {
'#weight' => 0,
'#description' => t("Optionally specify an alternative URL by which this term can be accessed. Use a relative path and don't add a trailing slash or the URL alias won't work."),
);
- $form['identification']['path']['pid'] = array('#type' => 'value', '#value' => $path['pid']);
- $form['identification']['path']['source'] = array('#type' => 'value', '#value' => $path['source']);
- $form['identification']['path']['language'] = array('#type' => 'value', '#value' => $path['language']);
+ $form['path']['pid'] = array('#type' => 'value', '#value' => $path['pid']);
+ $form['path']['source'] = array('#type' => 'value', '#value' => $path['source']);
+ $form['path']['language'] = array('#type' => 'value', '#value' => $path['language']);
}
}
@@ -305,4 +305,3 @@ function path_taxonomy_term_delete($term) {
// Delete all aliases associated with this term.
path_delete(array('source' => 'taxonomy/term/' . $term->tid));
}
-
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index 57f77ca78..98cdf2fc8 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -664,6 +664,7 @@ function taxonomy_form_term($form, &$form_state, $edit = array(), $vocabulary =
'#title' => t('Relations'),
'#collapsible' => TRUE,
'#collapsed' => $vocabulary->hierarchy < 2,
+ '#weight' => 10,
);
// taxonomy_get_tree and taxonomy_get_parents may contain large numbers of
@@ -702,23 +703,35 @@ function taxonomy_form_term($form, &$form_state, $edit = array(), $vocabulary =
'#size' => 6,
'#default_value' => $edit['weight'],
'#description' => t('Terms are displayed in ascending order by weight.'),
- '#required' => TRUE);
+ '#required' => TRUE,
+ );
$form['vid'] = array(
'#type' => 'value',
- '#value' => $vocabulary->vid);
- $form['submit'] = array(
+ '#value' => $vocabulary->vid,
+ );
+ $form['tid'] = array(
+ '#type' => 'value',
+ '#value' => $edit['tid'],
+ );
+
+ $form['actions'] = array(
+ '#type' => 'container',
+ '#attributes' => array('class' => array('form-actions')),
+ '#weight' => 100,
+ );
+ $form['actions']['submit'] = array(
'#type' => 'submit',
- '#value' => t('Save'));
+ '#value' => t('Save'),
+ '#weight' => 5,
+ );
if ($edit['tid']) {
- $form['delete'] = array(
+ $form['actions']['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
'#access' => user_access("delete terms in $vocabulary->vid") || user_access('administer taxonomy'),
+ '#weight' => 10,
);
- $form['tid'] = array(
- '#type' => 'value',
- '#value' => $edit['tid']);
}
else {
$form_state['redirect'] = $_GET['q'];