Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 4054:6070bc4935fa
Provide a a "no selection" option; cleanup.
| author | Stefan Seefeld <stefan@seefeld.name> |
|---|---|
| date | Thu, 19 Feb 2009 23:16:00 +0000 |
| parents | f2030089dac6 |
| children | de832c486f86 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Thu Feb 19 21:59:14 2009 +0000 +++ b/roundup/cgi/templating.py Thu Feb 19 23:16:00 2009 +0000 @@ -2119,10 +2119,9 @@ l = ['<select multiple name="%s" size="%s">'%(self._formname, height)] k = linkcl.labelprop(1) - # make sure we list the current values if they're retired - for val in value: - if val not in options: - options.insert(0, val) + if value: + l.append('<option value="%s">- no selection -</option>' + % ','.join(['-' + v for v in value])) if additional: additional_fns = []
