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 @@ ...@@ -42,17 +42,16 @@
<tal:block tal:condition="here/portal_skins/updateSkinCookie | nothing"\n <tal:block tal:condition="here/portal_skins/updateSkinCookie | nothing"\n
tal:define="dummy here/setupCurrentSkin;" />\n tal:define="dummy here/setupCurrentSkin;" />\n
<tal:block tal:define="response request/RESPONSE;\n <tal:block tal:define="response request/RESPONSE;\n
mtool here/portal_membership;\n came_from python: request.get(\'came_from\') or request.get(\'field_came_from\');\n
isAnon mtool/isAnonymousUser|nothing;">\n isAnon here/portal_membership/isAnonymousUser|nothing;">\n
<tal:block tal:condition="isAnon">\n <tal:block tal:condition="isAnon">\n
<tal:block tal:define="dummy python: response.expireCookie(\'__ac\', path=\'/\');\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: \'%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 dummy python: response.redirect(url);" />\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="not: isAnon">\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 <tal:block tal:define="dummy python: response.redirect(came_from or here.getPermanentURL(here));" />\n
dummy python: response.redirect(came_from);" />\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
......
1100 1101
\ No newline at end of file
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