web/views/baseforms.py
changeset 186 5e550c6e554c
parent 62 ef06f71533d9
child 237 3df2e0ae2eba
--- a/web/views/baseforms.py	Mon Dec 08 11:46:49 2008 +0100
+++ b/web/views/baseforms.py	Mon Dec 08 14:47:07 2008 +0100
@@ -118,7 +118,7 @@
         self.w(u'<input type="hidden" name="%s" value="%s"/>\n'
                % (eid_param('state', eid), dest.eid))
         self.w(u'<input type="hidden" name="__redirectpath" value="%s"/>\n'
-               % html_escape(entity.rest_path()))
+               % html_escape(self.redirectpath(entity)))
         self.fill_form(entity, state, dest)
         self.w(u'<input type="hidden" name="__method" value="set_state"/>\n')
         self.w(self.button_ok(label=stdmsgs.YES, tabindex=self.req.next_tabindex()))
@@ -144,6 +144,9 @@
         self.w(u'<textarea rows="10" cols="80" name="%s" tabindex="%s"></textarea><br/>\n'
                % (cformname, self.req.next_tabindex()))
 
+    def redirectpath(self, entity):
+        return entity.rest_path()
+
 
 class ClickAndEditForm(EntityForm):
     id = 'reledit'