Code

Provide a a "no selection" option; cleanup.
authorstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 19 Feb 2009 23:16:00 +0000 (23:16 +0000)
committerstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 19 Feb 2009 23:16:00 +0000 (23:16 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4146 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/templating.py

index e03310ad7bf394b6ad912fbd57aa6c1f646fc9b9..ce4daaf2a00758410c131d298d88894af1bb9a5e 100644 (file)
@@ -2119,10 +2119,9 @@ class MultilinkHTMLProperty(HTMLProperty):
         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 = []