Code

added an additional argument to help_window to allow comms back to form
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 26 Mar 2003 00:32:08 +0000 (00:32 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 26 Mar 2003 00:32:08 +0000 (00:32 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1623 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/templating.py

index 9df83d2a01f5f0fe66687dde89a85090b99af805..0587ba5c28a4fc9ee95622ea49458d629d13383b 100644 (file)
@@ -421,7 +421,7 @@ class HTMLClass(HTMLPermissions):
         return l
 
     def classhelp(self, properties=None, label='list', width='500',
-            height='400'):
+            height='400', property=''):
         ''' Pop up a javascript window with class help
 
             This generates a link to a popup window which displays the 
@@ -433,14 +433,19 @@ class HTMLClass(HTMLPermissions):
 
             You may optionally override the label displayed, the width and
             height. The popup window will be resizable and scrollable.
+
+            If the "property" arg is given, it's passed through to the
+            javascript help_window function.
         '''
         if properties is None:
             properties = self._klass.getprops(protected=0).keys()
             properties.sort()
             properties = ','.join(properties)
+        if property:
+            property = '&property=%s'%property
         return '<a href="javascript:help_window(\'%s?:template=help&' \
-            'properties=%s\', \'%s\', \'%s\')"><b>(%s)</b></a>'%(
-            self.classname, properties, width, height, label)
+            'properties=%s%s\', \'%s\', \'%s\')"><b>(%s)</b></a>'%(
+            self.classname, property, properties, width, height, label)
 
     def submit(self, label="Submit New Entry"):
         ''' Generate a submit button (and action hidden element)