From 78804c414d04bdeeeda2600419e45f51ab07aadf Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 1 Feb 2010 04:54:59 +0000 Subject: [PATCH] Allow value to be specified to multilink form element templating git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4443 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 2 ++ roundup/cgi/templating.py | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index e311524..7161378 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,6 +27,8 @@ Fixes: fixes issue1675845 - Attempt to generate more human-readable addresses in email, fixes issue2550632 +- Allow value to be specified to multilink form element templating, fixes + issue2550613, thanks David Wolever 2009-12-21 1.4.11 (r4413) diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index ff354da..2e09041 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -2154,16 +2154,18 @@ class MultilinkHTMLProperty(HTMLProperty): return self.plain(escape=1) linkcl = self._db.getclass(self._prop.classname) - value = self._value[:] - # map the id to the label property - if not linkcl.getkey(): - showid=1 - if not showid: - k = linkcl.labelprop(1) - value = lookupKeys(linkcl, k, value) - value = ','.join(value) - return self.input(name=self._formname, size=size, value=value, - **kwargs) + + if 'value' not in kwargs: + value = self._value[:] + # map the id to the label property + if not linkcl.getkey(): + showid=1 + if not showid: + k = linkcl.labelprop(1) + value = lookupKeys(linkcl, k, value) + value = ','.join(value) + + return self.input(name=self._formname, size=size, **kwargs) def menu(self, size=None, height=None, showid=0, additional=[], value=None, sort_on=None, html_kwargs = {}, **conditions): -- 2.30.2