Skip to content

Commit 7a7dbbf

Browse files
author
Richard Jones
committed
added an additional argument to help_window to allow comms back to form
1 parent 6cd5768 commit 7a7dbbf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

roundup/cgi/templating.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def filter(self, request=None):
421421
return l
422422

423423
def classhelp(self, properties=None, label='list', width='500',
424-
height='400'):
424+
height='400', property=''):
425425
''' Pop up a javascript window with class help
426426
427427
This generates a link to a popup window which displays the
@@ -433,14 +433,19 @@ def classhelp(self, properties=None, label='list', width='500',
433433
434434
You may optionally override the label displayed, the width and
435435
height. The popup window will be resizable and scrollable.
436+
437+
If the "property" arg is given, it's passed through to the
438+
javascript help_window function.
436439
'''
437440
if properties is None:
438441
properties = self._klass.getprops(protected=0).keys()
439442
properties.sort()
440443
properties = ','.join(properties)
444+
if property:
445+
property = '&property=%s'%property
441446
return '<a href="javascript:help_window(\'%s?:template=help&' \
442-
'properties=%s\', \'%s\', \'%s\')"><b>(%s)</b></a>'%(
443-
self.classname, properties, width, height, label)
447+
'properties=%s%s\', \'%s\', \'%s\')"><b>(%s)</b></a>'%(
448+
self.classname, property, properties, width, height, label)
444449

445450
def submit(self, label="Submit New Entry"):
446451
''' Generate a submit button (and action hidden element)

0 commit comments

Comments
 (0)