Skip to content

Commit

Permalink
Improved Vocabulary selection UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Pelletier committed Jun 13, 2000
1 parent b94ae84 commit e8875ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions ZCatalog.py
Expand Up @@ -106,15 +106,14 @@

manage_addZCatalogForm=HTMLFile('addZCatalog',globals())

def manage_addZCatalog(self, id, title, vocab='', vocab_id='', REQUEST=None):
def manage_addZCatalog(self, id, title, vocab_id='', REQUEST=None):
"""Add a ZCatalog object
"""
id=str(id)
title=str(title)
vocab=str(vocab)
vocab_id=str(vocab_id)

c=ZCatalog(id, title, vocab, vocab_id, self)
c=ZCatalog(id, title, vocab_id, self)
self._setObject(id, c)
if REQUEST is not None:
return self.manage_main(self, REQUEST)
Expand Down Expand Up @@ -196,15 +195,15 @@ class is that it is not Zope specific. You can use it in any
threshold=10000
_v_total=0

def __init__(self, id, title='', vocab=0, vocab_id='', container=None):
def __init__(self, id, title='', vocab_id='', container=None):
self.id=id
self.title=title
self.vocab_id = vocab_id

self.threshold = 10000
self._v_total = 0

if not vocab:
if vocab_id == 'create_default_catalog_':
v = Vocabulary('Vocabulary', 'Vocabulary', globbing=1)
self._setObject('Vocabulary', v)
v = 'Vocabulary'
Expand Down
2 changes: 1 addition & 1 deletion addZCatalog.dtml
Expand Up @@ -31,8 +31,8 @@
<EM><STRONG>Vocabulary</STRONG></EM>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<em>Select Vocabulary?</em> <input type="checkbox" name="vocab">
<select name="vocab_id">
<option value="create_default_catalog_">Create one for me</option>
<dtml-in "superValues('Vocabulary')">
<option value="<dtml-var id html_quote>">
<dtml-var id>
Expand Down

0 comments on commit e8875ae

Please sign in to comment.