diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/taxonomy.module | 6 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index f2e07199f..97a069488 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -533,11 +533,11 @@ function taxonomy_form_alter($form_id, &$form) { else { $ntterms = isset($node->taxonomy) ? $terms : array_keys($terms); $form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, $ntterms, $help, 'taxonomy'); + $form['taxonomy'][$vocabulary->vid]['#weight'] = $vocabulary->weight; } } if (isset($form['taxonomy'])) { - $form['taxonomy']['#tree'] = TRUE; - $form['taxonomy']['#weight'] = $vocabulary->weight; + $form['taxonomy'] = array_merge($form['taxonomy'], array('#type' => 'fieldset', '#title' => t('Categories'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#tree' => TRUE, '#weight' => -3)); } } } @@ -914,7 +914,7 @@ function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $descripti $value = $tree[0]->tid; } } - return array('#type' => 'select', '#title' => $title, '#default_value' => $value, '#options' => $options, '#description' => $description, '#multiple' => $multiple, '#size' => $multiple ? 'size="'. min(12, count($options)) .'"' : 0, '#weight' => -15, '#theme' => 'taxonomy_term_select'); + return array('#type' => 'select', '#title' => $title, '#default_value' => $value, '#options' => $options, '#description' => $description, '#multiple' => $multiple, '#size' => $multiple ? min(9, count($options)) : 0, '#weight' => -15, '#theme' => 'taxonomy_term_select'); } function theme_taxonomy_term_select($element) { diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index f2e07199f..97a069488 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -533,11 +533,11 @@ function taxonomy_form_alter($form_id, &$form) { else { $ntterms = isset($node->taxonomy) ? $terms : array_keys($terms); $form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, $ntterms, $help, 'taxonomy'); + $form['taxonomy'][$vocabulary->vid]['#weight'] = $vocabulary->weight; } } if (isset($form['taxonomy'])) { - $form['taxonomy']['#tree'] = TRUE; - $form['taxonomy']['#weight'] = $vocabulary->weight; + $form['taxonomy'] = array_merge($form['taxonomy'], array('#type' => 'fieldset', '#title' => t('Categories'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#tree' => TRUE, '#weight' => -3)); } } } @@ -914,7 +914,7 @@ function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $descripti $value = $tree[0]->tid; } } - return array('#type' => 'select', '#title' => $title, '#default_value' => $value, '#options' => $options, '#description' => $description, '#multiple' => $multiple, '#size' => $multiple ? 'size="'. min(12, count($options)) .'"' : 0, '#weight' => -15, '#theme' => 'taxonomy_term_select'); + return array('#type' => 'select', '#title' => $title, '#default_value' => $value, '#options' => $options, '#description' => $description, '#multiple' => $multiple, '#size' => $multiple ? min(9, count($options)) : 0, '#weight' => -15, '#theme' => 'taxonomy_term_select'); } function theme_taxonomy_term_select($element) { |