[views] do not eat the self._cw.message in LogFormView (closes #12421177)
authorDavid Douard <david.douard@logilab.fr>
Wed, 20 Apr 2016 14:43:48 +0200
changeset 11234 558e5a6d1ec3
parent 11233 f24e83a82a4f
child 11235 636a83e65870
[views] do not eat the self._cw.message in LogFormView (closes #12421177) accessing self._cw.message now(?) eat the message, so don't call "self._cw.message" twice.
web/views/basetemplates.py
--- a/web/views/basetemplates.py	Tue Apr 19 13:57:12 2016 +0200
+++ b/web/views/basetemplates.py	Wed Apr 20 14:43:48 2016 +0200
@@ -508,8 +508,10 @@
                 stitle = u'&#160;'
             w(u'<div class="loginTitle">%s</div>' % stitle)
         w(u'<div class="loginContent">\n')
-        if showmessage and self._cw.message:
-            w(u'<div class="loginMessage">%s</div>\n' % self._cw.message)
+        # don't call self._cw.message twice since it pops the id
+        msg = self._cw.message
+        if showmessage and msg:
+            w(u'<div class="loginMessage">%s</div>\n' % msg)
         config = self._cw.vreg.config
         if config['auth-mode'] != 'http':
             self.login_form(id) # Cookie authentication