durusmail: quixote-users: [Micropatch] implement TextWidget "wrap" attribute
[Micropatch] implement TextWidget "wrap" attribute
[Micropatch] implement TextWidget "wrap" attribute
2002-11-18
[Micropatch] implement TextWidget "wrap" attribute
2002-11-18
[Micropatch] implement TextWidget "wrap" attribute
2002-11-18
Emacs python-mode for .ptl
2002-12-20
2002-12-21
Dave Kuhlman (2 parts)
2003-01-03
[Micropatch] implement TextWidget "wrap" attribute
Jonathan Corbet
2002-11-18
The documentation and the source for the TextWidget class both promise a
"wrap" attribute, which does the obvious thing in the rendered HTML.  They
lie, however.  It kind of looks like nobody quite got around to
implementing it.  So I finished the job...

jon


--- form/widget.py.0.51 2002-11-18 14:23:11.000000000 -0700
+++ form/widget.py      2002-11-18 14:23:58.000000000 -0700
@@ -167,15 +167,18 @@
     widget_type = "text"

     def __init__ (self, name, value=None,
-                  cols=None, rows=None):
+                  cols=None, rows=None,
+                  wrap=None):
         Widget.__init__(self, name, value)
         self.cols = cols
         self.rows = rows
+        self.wrap = wrap

     def render (self, request):
         return (render_tag("textarea", name=self.name,
                            cols=self.cols,
-                           rows=self.rows) +
+                           rows=self.rows,
+                           wrap=self.wrap) +
                 html_quote(self.value, "") +
                 "")


reply