=== modified file 'modules/taxonomy/taxonomy.module' --- modules/taxonomy/taxonomy.module +++ modules/taxonomy/taxonomy.module @@ -357,8 +357,7 @@ function taxonomy_form_term($vocabulary_ $vocabulary = taxonomy_get_vocabulary($vocabulary_id); $form['name'] = array('#type' => 'textfield', '#title' => t('Term name'), '#default_value' => $edit['name'], '#maxlength' => 64, '#description' => t('The name for this term. Example: "Linux".'), '#required' => TRUE); - - $form['description'] = array('#type' => 'textarea', '#title' => t('Description'), '#default_value' => $edit['description'], '#description' => t('A description of the term.')); + $form['weight'] = array('#type' => 'weight', '#title' => t('Weight'), '#default_value' => $edit['weight'], '#description' => t('In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.')); if ($vocabulary->hierarchy) { $parent = array_keys(taxonomy_get_parents($edit['tid'])); @@ -378,20 +377,17 @@ function taxonomy_form_term($vocabulary_ } } - if ($vocabulary->relations) { - $form['relations'] = _taxonomy_term_select(t('Related terms'), 'relations', array_keys(taxonomy_get_related($edit['tid'])), $vocabulary_id, NULL, 1, '<'. t('none') .'>', array($edit['tid'])); - } - - $form['synonyms'] = array('#type' => 'textarea', '#title' => t('Synonyms'), '#default_value' => implode("\n", taxonomy_get_synonyms($edit['tid'])), '#description' => t('Synonyms of this term, one synonym per line.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms')))); - $form['weight'] = array('#type' => 'weight', '#title' => t('Weight'), '#default_value' => $edit['weight'], '#description' => t('In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.')); + $form['advanced'] = array( + '#type' => 'fieldset', + '#title' => t('Advanced Options'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + $form['advanced']['description'] = array('#type' => 'textarea', '#title' => t('Description'), '#default_value' => $edit['description'], '#description' => t('A description of the term.')); - // Add extra term form elements. - $extra = module_invoke_all('taxonomy', 'term', 'vocabulary'); - if (is_array($extra)) { - foreach ($extra as $key => $element) { - $extra[$key]['#weight'] = isset($extra[$key]['#weight']) ? $extra[$key]['#weight'] : -18; - } - $form = array_merge($form, $extra); + $form['advanced']['synonyms'] = array('#type' => 'textarea', '#title' => t('Synonyms'), '#default_value' => implode("\n", taxonomy_get_synonyms($edit['tid'])), '#description' => t('Synonyms of this term, one synonym per line.', array('@help-url' => url('admin/help/taxonomy', NULL, NULL, 'synonyms')))); + if ($vocabulary->relations) { + $form['advanced']['relations'] = _taxonomy_term_select(t('Related terms'), 'relations', array_keys(taxonomy_get_related($edit['tid'])), $vocabulary_id, NULL, 1, '<'. t('none') .'>', array($edit['tid'])); }