Author: eallen
Date: 2011-02-11 20:25:48 +0000 (Fri, 11 Feb 2011)
New Revision: 4521
Modified:
trunk/wooly/python/wooly/forms.py
trunk/wooly/python/wooly/forms.strings
Log:
Added ability to put a title attribute on input text fields
Modified: trunk/wooly/python/wooly/forms.py
===================================================================
--- trunk/wooly/python/wooly/forms.py 2011-02-11 20:25:05 UTC (rev 4520)
+++ trunk/wooly/python/wooly/forms.py 2011-02-11 20:25:48 UTC (rev 4521)
@@ -144,10 +144,15 @@
super(ScalarInput, self).__init__(app, name, param)
self.size = 32
+ self.title = None
def render_size(self, session, *args):
return self.size
+ def render_title(self, session, *args):
+ if self.title:
+ return "title=\"%s\"" % self.title
+
class StringInput(ScalarInput):
def __init__(self, app, name):
super(StringInput, self).__init__(app, name, None)
Modified: trunk/wooly/python/wooly/forms.strings
===================================================================
--- trunk/wooly/python/wooly/forms.strings 2011-02-11 20:25:05 UTC (rev 4520)
+++ trunk/wooly/python/wooly/forms.strings 2011-02-11 20:25:48 UTC (rev 4521)
@@ -70,7 +70,7 @@
<button class="{class}" type="{type}"
tabindex="{tab_index}" {disabled_attr} name="{name}"
value="{value}" onclick="return {onclick}('{name}',
'{value}')">{content}</button>
[ScalarInput.html]
-<input type="text" name="{name}" value="{value}"
tabindex="{tab_index}" {disabled_attr} size="{size}"/>
+<input type="text" name="{name}" value="{value}"
tabindex="{tab_index}" {disabled_attr} size="{size}" {title}/>
[MultilineStringInput.html]
<textarea name="{name}" tabindex="{tab_index}" {disabled_attr}
rows="{rows}" cols="{columns}">{value}</textarea>
Show replies by date