Commit 0a8e9aec authored by Amos Latteier's avatar Amos Latteier

Changed help system button to explicitly require a product name. Also added a...

Changed help system button to explicitly require a product name. Also added a helpURL method to generate a URL to a help topic given a product name a topic name.
parent d52bec53
...@@ -150,12 +150,15 @@ class HelpSystem(Acquisition.Implicit, ObjectManager, Item, Persistent): ...@@ -150,12 +150,15 @@ class HelpSystem(Acquisition.Implicit, ObjectManager, Item, Persistent):
button=HTMLFile('button', globals()) button=HTMLFile('button', globals())
def HelpButton(self, topic, product='OFSP'): def HelpButton(self, topic, product):
""" """
Insert a help button linked to a help topic. Insert a help button linked to a help topic.
""" """
return self.button(self, self.REQUEST, product=product, topic=topic) return self.button(self, self.REQUEST, product=product, topic=topic)
helpURL=HTMLFile('helpURL',globals())
class ProductHelp(Acquisition.Implicit, ObjectManager, Item, Persistent): class ProductHelp(Acquisition.Implicit, ObjectManager, Item, Persistent):
""" """
......
...@@ -7,12 +7,9 @@ ...@@ -7,12 +7,9 @@
} }
</SCRIPT> </SCRIPT>
<font face="Verdana, Arial, Helvetica" size="1"> <font face="Verdana, Arial, Helvetica" size="1">
<form action="<dtml-var absolute_url>" target="zope_help" method="post" <FORM ACTION="<dtml-var absolute_url>" METHOD="get" target="zope_help" onSubmit="return openHelpWindow('<dtml-var absolute_url>?help_url=<dtml-var helpURL>');">
onSubmit="return openHelpWindow('<dtml-var absolute_url>?help_url=/Control_Panel/Products/&dtml-product;/Help/&dtml-topic;');"> <input type="hidden" name="help_url" value="<dtml-var helpURL>">
<dtml-if "_.getitem('product') and _.getitem('topic')"> <input type="submit" name="submit" value=" Help ">
<input type="hidden" name="help_url" value="/Control_Panel/Products/&dtml-product;/Help/&dtml-topic;"> </FORM>
</dtml-if>
<input type="submit" value=" Help ">
</form>
</font> </font>
</div> </div>
\ No newline at end of file
<dtml-var SCRIPT_NAME>/Control_Panel/Products/<dtml-var product>/Help/<dtml-var topic>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment