From 67778c896e35b69667d9081dbbf3d7206b86fc41 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 10 Jan 2006 19:56:19 +0000 Subject: - Patch #39672 by Ber: made the help text opion work for free tagging terms. --- modules/taxonomy.module | 8 +++++++- modules/taxonomy/taxonomy.module | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'modules') 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); -- cgit v1.2.3