From: stefan Date: Mon, 16 Feb 2009 21:26:29 +0000 (+0000) Subject: Allow 'no value' to be selected in LinkHTMLProperty.menu() X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6fbb3f3c30094210a18b47bd4137e0733b58069d;p=roundup.git Allow 'no value' to be selected in LinkHTMLProperty.menu() git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4135 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index 73459f4..12120e9 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -1873,8 +1873,14 @@ class LinkHTMLProperty(HTMLProperty): if not self.is_edit_ok(): return self.plain(escape=1) + # Since None indicates the default, we need another way to + # indicate "no selection". We use -1 for this purpose, as + # that is the value we use when submitting a form without the + # value set. if value is None: value = self._value + elif value == '-1': + value = None linkcl = self._db.getclass(self._prop.classname) l = ['