diff roundup/cgi/templating.py @ 3857:54c10d188b8b

allow customisation of the edit action for the submit button also when submitting new item
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Wed, 16 May 2007 09:42:36 +0000
parents b38bb4ca3fc0
children c672b15ddae6
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Wed May 16 09:18:26 2007 +0000
+++ b/roundup/cgi/templating.py	Wed May 16 09:42:36 2007 +0000
@@ -710,7 +710,7 @@
         return '<a class="classhelp" href="%s" onclick="%s">%s</a>' % \
                (help_url, onclick, self._(label))
 
-    def submit(self, label=''"Submit New Entry"):
+    def submit(self, label=''"Submit New Entry", action="new"):
         """ Generate a submit button (and action hidden element)
 
         Generate nothing if we're not editable.
@@ -718,7 +718,7 @@
         if not self.is_edit_ok():
             return ''
 
-        return self.input(type="hidden", name="@action", value="new") + \
+        return self.input(type="hidden", name="@action", value=action) + \
             '\n' + \
             self.input(type="submit", name="submit_button", value=self._(label))
 

Roundup Issue Tracker: http://roundup-tracker.org/