[Bug 157373] [NEW] htmlgen lacks of a few Ids
Launchpad Bug Tracker
157373 at bugs.launchpad.net
Thu Feb 17 10:03:12 UTC 2011
You have been subscribed to a public bug by Daniel Holbach (dholbach):
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,
radio, file, submit, reset, hidden.
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.value = None
self.checked = ''
self.size = 0
***************
*** 1313,1318 ****
--- 1315,1321 ----
s.append('\n<INPUT')
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.
>=2 means use a list widget with that many lines.
multiple -- flag to indicate whether multiple selections are supported.
***************
*** 1351,1356 ****
--- 1355,1361 ----
def __init__(self, data=None, **kw):
UserList.UserList.__init__(self, data)
self.name = ''
+ self.id = None
self.size = 1
self.multiple = None
self.selected = []
***************
*** 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)
** Affects: htmlgen (Ubuntu)
Importance: Wishlist
Status: Fix Released
--
htmlgen lacks of a few Ids
https://bugs.launchpad.net/bugs/157373
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is a direct subscriber.
More information about the Ubuntu-sponsors
mailing list