web/application.py
changeset 4913 083b4d454192
parent 4897 e402e0b32075
child 4914 dcb055f32d9b
--- a/web/application.py	Wed Mar 10 16:07:24 2010 +0100
+++ b/web/application.py	Mon Mar 01 11:26:14 2010 +0100
@@ -342,7 +342,11 @@
                 # redirect is raised by edit controller when everything went fine,
                 # so try to commit
                 try:
-                    req.cnx.commit()
+                    txuuid = req.cnx.commit()
+                    if txuuid is not None:
+                        msg = u'<span class="undo">[<a href="%s">%s</a>]</span>' %(
+                            req.build_url('undo', txuuid=txuuid), req._('undo'))
+                        req.append_to_redirect_message(msg)
                 except ValidationError, ex:
                     self.validation_error_handler(req, ex)
                 except Unauthorized, ex: