Commit db219dc8 authored by Dave Reid's avatar Dave Reid

#660026 by Dave Reid: Fixed XML sitemap fieldset showing up on the delete taxonomy term form.

parent 9c63ef7e
......@@ -43,6 +43,12 @@ function xmlsitemap_taxonomy_cron() {
* Implementation of hook_form_FORM_ID_alter().
*/
function xmlsitemap_taxonomy_form_taxonomy_form_term_alter(&$form, &$from_state) {
if (!isset($form['identification'])) {
// This same form is used for the term delete confirm form, so skip
// adding our fieldset if that is the case.
return;
}
$priority = db_result(db_query("SELECT priority_override
FROM {xmlsitemap_taxonomy}
WHERE tid = %d", $form['tid']['#value'])
......@@ -67,8 +73,12 @@ function xmlsitemap_taxonomy_form_taxonomy_form_term_alter(&$form, &$from_state)
'#default_value' => $priority,
'#options' => $options,
);
$form['submit']['#weight'] = isset($form['submit']['#weight']) ? $form['submit']['#weight'] + 1 : 1;
$form['delete']['#weight'] = isset($form['delete']['#weight']) ? $form['delete']['#weight'] + 1 : 1;
// The submit and delete buttons need to be weighted down.
$form['submit'] += array('#weight' => 100);
if (isset($form['delete'])) {
$form['delete'] += array('#weight' => 110);
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment