Commit 67778c89 authored by Dries's avatar Dries
Browse files

- Patch #39672 by Ber: made the help text opion work for free tagging terms.

parent 226a26a5
......@@ -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);
......
......@@ -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);
......
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