function hs_content_taxonomy_widget_settings in Hierarchical Select 6.3
Same name and namespace in other branches
- 5.3 modules/hs_content_taxonomy.module \hs_content_taxonomy_widget_settings()
Implementation of hook_widget_settings().
File
- modules/
hs_content_taxonomy.module, line 114 - Implementation of the Hierarchical Select API for the Content Taxonomy module.
Code
function hs_content_taxonomy_widget_settings($op, $widget) {
switch ($op) {
case 'form':
drupal_add_css(drupal_get_path('module', 'hs_content_taxonomy') . '/hs_content_taxonomy.css');
$context = _hs_content_taxonomy_parse_context_from_url();
list($content_type_name, $field_name) = $context;
$url = 'admin/content/node-type/' . $content_type_name . '/fields/' . $field_name . '/hs_config';
$items[] = t("Due to limitations of CCK, there is a separate form to <a href=\"!url\">\n configure this Hierarchical Select widget's settings.</a>", array(
'!url' => url($url),
));
$placeholders = array(
'%multiple_values' => t('Multiple values'),
'%enable_the_dropbox' => t('Enable the dropbox'),
'%save_term_lineage' => t('Save term lineage'),
);
$items[] = t('The %multiple_values field setting is now managed by the Hierarchical
Select module: it will be enabled when either the %enable_the_dropbox
or %save_term_lineage settings (or both) are enabled.', $placeholders);
$form['hs_config'] = array(
'#type' => 'fieldset',
'#title' => t('Hierarchical Select configuration'),
'#description' => '<p class="cck-hierarchical-select-warning">' . '<span class="highlight">Important!</span>' . '</p>' . theme('item_list', $items),
'#collapsible' => FALSE,
);
return $form;
case 'callbacks':
return array(
'default value' => CONTENT_CALLBACK_NONE,
);
}
}