Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 3856:b38bb4ca3fc0
allow customisation of the edit action for the submit button
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Wed, 16 May 2007 09:18:26 +0000 |
| parents | 920c6cfd87a3 |
| children | 54c10d188b8b |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Tue May 15 16:23:39 2007 +0000 +++ b/roundup/cgi/templating.py Wed May 16 09:18:26 2007 +0000 @@ -839,14 +839,14 @@ """Is this item retired?""" return self._klass.is_retired(self._nodeid) - def submit(self, label=''"Submit Changes"): + def submit(self, label=''"Submit Changes", action="edit"): """Generate a submit button. Also sneak in the lastactivity and action hidden elements. """ return self.input(type="hidden", name="@lastactivity", value=self.activity.local(0)) + '\n' + \ - self.input(type="hidden", name="@action", value="edit") + '\n' + \ + self.input(type="hidden", name="@action", value=action) + '\n' + \ self.input(type="submit", name="submit_button", value=self._(label)) def journal(self, direction='descending'):
