|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: htmltemplate.py,v 1.54 2002-01-14 05:16:51 richard Exp $ |
| 18 | +# $Id: htmltemplate.py,v 1.55 2002-01-14 06:45:03 richard Exp $ |
19 | 19 |
|
20 | 20 | __doc__ = """ |
21 | 21 | Template engine. |
@@ -179,23 +179,16 @@ def sortfunc(a, b, cl=linkcl): |
179 | 179 | elif isinstance(propclass, hyperdb.Multilink): |
180 | 180 | list = linkcl.list() |
181 | 181 | list.sort(sortfunc) |
182 | | - k = linkcl.labelprop() |
183 | 182 | l = [] |
184 | | - # special treatment for nosy list |
185 | | - if property == 'nosy': |
186 | | - input_value = [] |
187 | | - else: |
188 | | - input_value = value |
189 | | - for v in value: |
190 | | - lab = linkcl.get(v, k) |
191 | | - if property != 'nosy': |
192 | | - l.append('<a href="issue%s">%s: %s</a>'%(v,v,lab)) |
193 | | - else: |
194 | | - input_value.append(lab) |
| 183 | + # map the id to the label property |
| 184 | + # TODO: allow reversion to the older <select> box style display |
| 185 | + if not showid: |
| 186 | + k = linkcl.labelprop() |
| 187 | + value = [linkcl.get(v, k) for v in value] |
195 | 188 | if size is None: |
196 | 189 | size = '10' |
197 | 190 | l.insert(0,'<input name="%s" size="%s" value="%s">'%(property, |
198 | | - size, ','.join(input_value))) |
| 191 | + size, ','.join(value))) |
199 | 192 | s = "<br>\n".join(l) |
200 | 193 | else: |
201 | 194 | s = _('Plain: bad propclass "%(propclass)s"')%locals() |
@@ -889,6 +882,10 @@ def render(self, form): |
889 | 882 |
|
890 | 883 | # |
891 | 884 | # $Log: not supported by cvs2svn $ |
| 885 | +# Revision 1.54 2002/01/14 05:16:51 richard |
| 886 | +# The submit buttons need a name attribute or mozilla won't submit without a |
| 887 | +# file upload. Yeah, that's bloody obscure. Grr. |
| 888 | +# |
892 | 889 | # Revision 1.53 2002/01/14 04:03:32 richard |
893 | 890 | # How about that ... date fields have never worked ... |
894 | 891 | # |
|
0 commit comments