Commit bd5aa5b5 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix "came_from" support on login error in website mode.

parent 4a549808
......@@ -42,17 +42,16 @@
<tal:block tal:condition="here/portal_skins/updateSkinCookie | nothing"\n
tal:define="dummy here/setupCurrentSkin;" />\n
<tal:block tal:define="response request/RESPONSE;\n
mtool here/portal_membership;\n
isAnon mtool/isAnonymousUser|nothing;">\n
came_from python: request.get(\'came_from\') or request.get(\'field_came_from\');\n
isAnon here/portal_membership/isAnonymousUser|nothing;">\n
<tal:block tal:condition="isAnon">\n
<tal:block tal:define="dummy python: response.expireCookie(\'__ac\', path=\'/\');\n
url python: \'%s?portal_status_message=%s\' % (here.absolute_url(), here.Base_translateString(\'Login and/or password is incorrect.\'));\n
url python: request.get(\'came_from\') and \'%s&amp;came_from=%s\' % (url, request[\'came_from\']) or url;\n
url python: came_from and \'%s&amp;came_from=%s\' % (url, came_from) or url;\n
dummy python: response.redirect(url);" />\n
</tal:block>\n
<tal:block tal:condition="not: isAnon">\n
<tal:block tal:define="came_from python: request.get(\'came_from\') or request.get(\'field_came_from\') or here.getPermanentURL(here);\n
dummy python: response.redirect(came_from);" />\n
<tal:block tal:define="dummy python: response.redirect(came_from or here.getPermanentURL(here));" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
......
1100
\ No newline at end of file
1101
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment