htmlgen lacks of a few Ids
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
htmlgen (Ubuntu) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Binary package hint: python-htmlgen
The classes Input and Select don't support the 'ID' tag.
Here is a patch to fix it, please file this to the upstream maintainer for further releases.
Thanks in Advance,
Fred
*** HTMLgen.py.orig 2007-10-26 11:26:53.000000000 +0200
--- HTMLgen.py 2007-10-26 11:26:49.000000000 +0200
***************
*** 1262,1267 ****
--- 1262,1268 ----
type -- 'TEXT' (default) Supported types include password, checkbox,
name -- provides the datum name
+ id -- global identifier
value -- the initial value of the input item
checked -- flag indicating if the item is checked initially
size -- size of the widget (e.g. size=10 for a text widget is it's width)
***************
*** 1286,1291 ****
--- 1287,1293 ----
def __init__(self, **kw):
self.type = 'TEXT'
self.name = 'Default_Name'
+ self.id = None
self.size = 0
***************
*** 1313,1318 ****
--- 1315,1321 ----
if self.type: s.append(' TYPE="%s"' % self.type)
if self.name: s.append(' NAME="%s"' % self.name)
+ if self.id is not None: s.append(' ID="%s"' % self.id)
if self.value is not None: s.append(' VALUE="%s"' % self.value)
if self.checked: s.append(' CHECKED')
if self.size: s.append(' SIZE=%s' % self.size)
***************
*** 1340,1345 ****
--- 1343,1349 ----
Keyword Arguments:
name -- provides the datum name
+ id -- global identifier
size -- the visual size. 1 means use an option popup widget.
multiple -- flag to indicate whether multiple selections are supported.
***************
*** 1351,1356 ****
--- 1355,1361 ----
def __init__(self, data=None, **kw):
self.name = ''
+ self.id = None
self.size = 1
***************
*** 1366,1371 ****
--- 1371,1377 ----
def __str__(self):
s = ['<SELECT NAME="%s"' % self.name]
if self.size: s.append(' SIZE=%s' % self.size)
+ if self.id is not None: s.append(' ID="%s"' % self.id)
if self.multiple: s.append(' MULTIPLE')
if self.onBlur: s.append(' onBlur="%s"' % self.onBlur)
if self.onChange: s.append(' onChange="%s"' % self.onChange)
Related branches
Changed in htmlgen: | |
importance: | Undecided → Wishlist |
status: | New → Fix Committed |
Changed in htmlgen: | |
status: | Fix Committed → Confirmed |
ok, patch applied...