From cbad2c8acae5126073ddd6b8570f2e02b39fb608 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Tue, 13 Feb 2007 14:48:13 +0000
Subject: [PATCH] Better support for erp5_web login

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12662 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_xhtml_style/logged_in.xml               | 4 ++--
 .../portal_skins/erp5_xhtml_style/login_form.xml              | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml
index 62f527d95f..3b9d30da13 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml
@@ -61,12 +61,12 @@
                        isAnon mtool/isAnonymousUser|nothing;">\n
   <tal:block tal:condition="isAnon">\n
     <tal:block tal:define="dummy python: response.expireCookie(\'__ac\', path=\'/\');\n
-                           url python: \'%s/login_form?portal_status_message=%s\' % (here.portal_url(), here.getPortalObject().Localizer.translate(\'ui\', \'Login+and/or+password+is+incorrect.\'));\n
+                           url python: \'%s/login_form?portal_status_message=%s\' % (here.absolute_url(), here.getPortalObject().Localizer.translate(\'ui\', \'Login+and/or+password+is+incorrect.\'));\n
                            url python: request.get(\'came_from\') and  \'%s&came_from=%s\' % (url, request[\'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 here.portal_url() + \'/view\';\n
+    <tal:block tal:define="came_from python: request.get(\'came_from\') or here.absolute_url() + \'/view\';\n
                            dummy python: response.redirect(came_from);" />\n
   </tal:block>\n
 </tal:block>
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/login_form.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/login_form.xml
index c4bb28b5d4..df5d39ba65 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/login_form.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/login_form.xml
@@ -85,6 +85,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
 -->\n
 </tal:block>\n
 <tal:block tal:define="form_action string:logged_in;\n
+                       global form_id string:login_form;\n
                        js_list python: [\'%s/login_form.js\' % (here.portal_url.getPortalPath(), )]">\n
 <tal:block metal:use-macro="here/main_template/macros/master">\n
   <tal:block metal:fill-slot="main">\n
-- 
2.30.9