Skip to content

Commit 9428c97

Browse files
author
Ralf Schlatterbeck
committed
allow customisation of the edit action for the submit button
also when submitting new item
1 parent a355aaf commit 9428c97

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
@@ -710,15 +710,15 @@ def classhelp(self, properties=None, label=''"(list)", width='500',
710710
return '<a class="classhelp" href="%s" onclick="%s">%s</a>' % \
711711
(help_url, onclick, self._(label))
712712

713-
def submit(self, label=''"Submit New Entry"):
713+
def submit(self, label=''"Submit New Entry", action="new"):
714714
""" Generate a submit button (and action hidden element)
715715
716716
Generate nothing if we're not editable.
717717
"""
718718
if not self.is_edit_ok():
719719
return ''
720720

721-
return self.input(type="hidden", name="@action", value="new") + \
721+
return self.input(type="hidden", name="@action", value=action) + \
722722
'\n' + \
723723
self.input(type="submit", name="submit_button", value=self._(label))
724724

0 commit comments

Comments
 (0)