diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-10 19:56:19 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-10 19:56:19 +0000 |
commit | 67778c896e35b69667d9081dbbf3d7206b86fc41 (patch) | |
tree | 0dceb782039476f9cce14b93e105b7413f69745b | |
parent | 226a26a55685e90a866ebf5e79965d9626b479cc (diff) | |
download | brdo-67778c896e35b69667d9081dbbf3d7206b86fc41.tar.gz brdo-67778c896e35b69667d9081dbbf3d7206b86fc41.tar.bz2 |
- Patch #39672 by Ber: made the help text opion work for free tagging terms.
-rw-r--r-- | modules/taxonomy.module | 8 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index de8b86404..cd58909e6 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -522,7 +522,13 @@ function taxonomy_form_alter($form_id, &$form) { } $typed_string = implode(', ', $typed_terms) . (array_key_exists('tags', $terms) ? $terms['tags'][$vocabulary->vid] : NULL); - $form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield', '#default_value' => $typed_string, '#maxlength' => 100, '#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid, '#required' => $vocabulary->required, '#title' => $vocabulary->name, '#description' => t('A comma-separated list of terms describing this content (Example: funny, bungie jumping, "Company, Inc.").')); + if ($vocabulary->help) { + $help = $vocabulary->help; + } + else { + $help = t('A comma-separated list of terms describing this content. Example: funny, bungie jumping, "Company, Inc.".'); + } + $form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield', '#default_value' => $typed_string, '#maxlength' => 100, '#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid, '#required' => $vocabulary->required, '#title' => $vocabulary->name, '#description' => $help); } else { $ntterms = isset($node->taxonomy) ? $terms : array_keys($terms); diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index de8b86404..cd58909e6 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -522,7 +522,13 @@ function taxonomy_form_alter($form_id, &$form) { } $typed_string = implode(', ', $typed_terms) . (array_key_exists('tags', $terms) ? $terms['tags'][$vocabulary->vid] : NULL); - $form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield', '#default_value' => $typed_string, '#maxlength' => 100, '#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid, '#required' => $vocabulary->required, '#title' => $vocabulary->name, '#description' => t('A comma-separated list of terms describing this content (Example: funny, bungie jumping, "Company, Inc.").')); + if ($vocabulary->help) { + $help = $vocabulary->help; + } + else { + $help = t('A comma-separated list of terms describing this content. Example: funny, bungie jumping, "Company, Inc.".'); + } + $form['taxonomy']['tags'][$vocabulary->vid] = array('#type' => 'textfield', '#default_value' => $typed_string, '#maxlength' => 100, '#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid, '#required' => $vocabulary->required, '#title' => $vocabulary->name, '#description' => $help); } else { $ntterms = isset($node->taxonomy) ? $terms : array_keys($terms); |