Skip to content

Commit a355aaf

Browse files
author
Ralf Schlatterbeck
committed
allow customisation of the edit action for the submit button
1 parent 19abbd4 commit a355aaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roundup/cgi/templating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,14 +839,14 @@ def is_retired(self):
839839
"""Is this item retired?"""
840840
return self._klass.is_retired(self._nodeid)
841841

842-
def submit(self, label=''"Submit Changes"):
842+
def submit(self, label=''"Submit Changes", action="edit"):
843843
"""Generate a submit button.
844844
845845
Also sneak in the lastactivity and action hidden elements.
846846
"""
847847
return self.input(type="hidden", name="@lastactivity",
848848
value=self.activity.local(0)) + '\n' + \
849-
self.input(type="hidden", name="@action", value="edit") + '\n' + \
849+
self.input(type="hidden", name="@action", value=action) + '\n' + \
850850
self.input(type="submit", name="submit_button", value=self._(label))
851851

852852
def journal(self, direction='descending'):

0 commit comments

Comments
 (0)