diff --git a/doc/customizing.txt b/doc/customizing.txt
index eb6b8adceeed1c70a49388a0f576c9aea12d2d35..a1b46ac3172f61e75c3bedf0cab5843160cf18f0 100644 (file)
--- a/doc/customizing.txt
+++ b/doc/customizing.txt
Customising Roundup
===================
-:Version: $Revision: 1.72 $
+:Version: $Revision: 1.73 $
.. This document borrows from the ZopeBook section on ZPT. The original is at:
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
'''
actions = client.Client.actions + (
('edit_with_timelog', 'timelogEditAction'),
+ ('new_with_timelog', 'timelogEditAction'),
)
def timelogEditAction(self):
self.form.list.append(MiniFieldStorage('times', entry))
# punt to the normal edit action
- return self.editItemAction()
+ if self.nodeid:
+ return self.editItemAction()
+ else:
+ return self.newItemAction()
you add this code to your Client class in your tracker's ``interfaces.py``
file. Locate the section that looks like::
<input type="submit" name="submit" value="Submit Changes">
</tal:block>
<tal:block tal:condition="not:context/id">
- <input type="hidden" name=":action" value="new">
+ <input type="hidden" name=":action" value="new_with_timelog">
<input type="submit" name="submit" value="Submit New Issue">
</tal:block>
</td>
</tr>
The important change is setting the action to "edit_with_timelog" for
- edit operations (where the item exists)
+ edit operations (where the item exists) and "new_with_timelog" for
+ creations operations.
6. We want to display a total of the time log times that have been accumulated
for an issue. To do this, we'll need to actually write some Python code,