From: John Glover Date: Wed, 08 Feb 2012 11:46:26 +0000 Subject: [1730][forms, templates] use a html select for X-Git-Url: https://maxious.lambdacomplex.org/git/?p=ckanext-datagovau.git&a=commitdiff&h=947c97199e7e2b662b3db06f937cddd48ef29088 --- [1730][forms, templates] use a html select for vocab tags instead of standard (free) input field --- --- a/ckanext/example/forms.py +++ b/ckanext/example/forms.py @@ -204,7 +204,7 @@ schema = package_form_schema() schema.update({ 'published_by': [not_empty, unicode, convert_to_extras], - 'vocab_tag_string': [ignore_missing, convert_to_tags(self.vocab_name)], + 'vocab_tags': [ignore_missing, convert_to_tags(self.vocab_name)], }) return schema @@ -218,7 +218,7 @@ 'tags': { '__extras': [keep_extras, free_tags_only] }, - 'vocab_tag_string': [convert_from_tags(self.vocab_name), ignore_missing], + 'vocab_tags_selected': [convert_from_tags(self.vocab_name), ignore_missing], 'published_by': [convert_from_extras, ignore_missing], }) return schema --- a/ckanext/example/theme/templates/forms/dataset_form.html +++ b/ckanext/example/theme/templates/forms/dataset_form.html @@ -147,8 +147,14 @@
- +
Similar to standard CKAN tags, but these use a fixed vocabulary.
${errors.get('vocab_tag_string', '')}