diff MoinMoin/util/web.py @ 422:1fe19d424346

added size attr to select widget imported from: moin--main--1.5--patch-426
author Thomas Waldmann <tw@waldmann-edv.de>
date Sat, 04 Feb 2006 13:24:45 +0000
parents a54cebaab73e
children e0e016a553bd
line wrap: on
line diff
--- a/MoinMoin/util/web.py	Sat Feb 04 12:10:42 2006 +0000
+++ b/MoinMoin/util/web.py	Sat Feb 04 13:24:45 2006 +0000
@@ -51,7 +51,7 @@
 
     return request.theme.make_icon(icon)
 
-def makeSelection(name, values, selectedval=None):
+def makeSelection(name, values, selectedval=None, size=1):
     """ Make a HTML <select> element named `name` from a value list.
         The list can either be a list of strings, or a list of
         (value, label) tuples.
@@ -59,7 +59,7 @@
         `selectedval` is the value that should be pre-selected.
     """
     from MoinMoin.widget import html
-    result = html.SELECT(name=name)
+    result = html.SELECT(name=name, size="%d" % int(size))
     for val in values:
         if not isinstance(val, type(())):
             val = (val, val)