From e26c0e6a8f9dca8e604bae291509feec1e492354 Mon Sep 17 00:00:00 2001 From: schlatterbeck Date: Fri, 30 Sep 2011 09:35:34 +0000 Subject: [PATCH] Allow to turn off translation of generated html options in menu method of LinkHTMLProperty and MultilinkHTMLProperty -- default is translation as it used to be git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4650 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 3 +++ roundup/cgi/templating.py | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c0825f8..5a792df 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,9 @@ Features: - issue2550678: Allow pagesize=-1 which returns all results. Suggested and implemented by John Kristensen. Tested by Satchidanand Haridas. (Bernhard) +- Allow to turn off translation of generated html options in menu method + of LinkHTMLProperty and MultilinkHTMLProperty -- default is + translation as it used to be (Ralf) Fixed: diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index b0eaf02..3cb9780 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -1973,7 +1973,7 @@ class LinkHTMLProperty(HTMLProperty): **kwargs) def menu(self, size=None, height=None, showid=0, additional=[], value=None, - sort_on=None, html_kwargs = {}, **conditions): + sort_on=None, html_kwargs={}, translate=True, **conditions): """ Render a form select list for this property "size" is used to limit the length of the list labels @@ -1986,6 +1986,11 @@ class LinkHTMLProperty(HTMLProperty): (direction, property) where direction is '+' or '-'. A single string with the direction prepended may be used. For example: ('-', 'order'), '+name'. + "html_kwargs" specified additional html args for the + generated html ') return '\n'.join(l) @@ -2198,7 +2206,8 @@ class MultilinkHTMLProperty(HTMLProperty): 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): + value=None, sort_on=None, html_kwargs={}, translate=True, + **conditions): """ Render a form ') -- 2.30.2