Item8972: NatSkin needs template updates for trunk compatibility
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: NatSkin
Branches:
Changes have been made to the login.tmpl to improve passthru of the path and action across the redirect for authentication. See also
Tasks.Item8937
--- templates/loginbase.nat.tmpl (revision 7327)
+++ templates/loginbase.nat.tmpl (working copy)
@@ -15,9 +15,9 @@
text="<script type='text/javascript' src='%PUBURLPATH%/%SYSTEMWEB%/NatSkin/login.js'></script>"
requires="JQUERYPLUGIN"
}%<!-- require -->
-<form id="LogonForm" name="LogonForm" action="%IF{"$'HTTPSLOGON'='on'" then="https" else="http"}%://%HTTP_HOST%%SCRIPTURLPATH{"login"}%/%WEB%/%TOPIC%" method="post">
+<form id="LogonForm" name="LogonForm" action="%IF{"$'HTTPSLOGON'='on'" then="https" else="http"}%://%HTTP_HOST%%SCRIPTURLPATH{"login"}%%PATH_INFO%" method="post">
<literal>%QUERYPARAMS{encoding="entity" format="<input type='hidden' name='$name' value='$value' />"}%</literal><!-- queryparams// -->
-%IF{"defined 'ORIGURL'" then="<input type='hidden' name='origurl' value='$percntORIGURL$percnt' />"}%
+%IF{"defined 'FOSWIKI_ORIGIN'" then="<input type='hidden' name='foswiki_origin' value='$percntFOSWIKI_ORIGIN$percnt' />"}%
<input type="submit" style="display:none" />
<div class="foswikiFormStep">
---+++ %MAKETEXT{"Username"}%:
--
GeorgeClark - 04 May 2010
NatSkin will have to work on 1.0.9 as well as on trunk. So we have to find a way to make it backwards compatible.
--
MichaelDaum - 04 May 2010
Michael, the following diff appears to work. I have not tested on 1.0.9, but it looks okay on trunk.
/var/www/SVN/foswiki/NatSkin/templates $ svn diff
Index: loginbase.nat.tmpl
===================================================================
--- loginbase.nat.tmpl (revision 7330)
+++ loginbase.nat.tmpl (working copy)
@@ -15,8 +15,9 @@
text="<script type='text/javascript' src='%PUBURLPATH%/%SYSTEMWEB%/NatSkin/login.js'></script>"
requires="JQUERYPLUGIN"
}%<!-- require -->
-<form id="LogonForm" name="LogonForm" action="%IF{"$'HTTPSLOGON'='on'" then="https" else="http"}%://%HTTP_HOST%%SCRIPTURLPATH{"login"}%/%WEB%/%TOPIC%" method="post">
+<form id="LogonForm" name="LogonForm" action="%IF{"$'HTTPSLOGON'='on'" then="https" else="http"}%://%HTTP_HOST%%SCRIPTURLPATH{"login"}%%IF{"defined 'PATH_INFO'" then="$percntPATH_INFO$percnt" else="/$percntWEB$percnt/$percntTOPIC$percnt"}%" method="post">
<literal>%QUERYPARAMS{encoding="entity" format="<input type='hidden' name='$name' value='$value' />"}%</literal><!-- queryparams// -->
+%IF{"defined 'FOSWIKI_ORIGIN'" then="<input type='hidden' name='foswiki_origin' value='$percntFOSWIKI_ORIGIN$percnt' />"}%
%IF{"defined 'ORIGURL'" then="<input type='hidden' name='origurl' value='$percntORIGURL$percnt' />"}%
<input type="submit" style="display:none" />
<div class="foswikiFormStep">
--
GeorgeClark - 05 May 2010
Looks good. Feel fee to check it in. Many thanks.
--
MichaelDaum - 05 May 2010