[Yanel-commits] rev 43931 - in public/yanel/trunk/src:
contributions/resources/forgotpw/htdocs
webapp/global-resource-configs
webapp/src/java/org/wyona/yanel/servlet webapp/xslt
guillaume at wyona.com
guillaume at wyona.com
Fri Jul 31 15:33:38 CEST 2009
Author: guillaume
Date: 2009-07-31 15:33:37 +0200 (Fri, 31 Jul 2009)
New Revision: 43931
Added:
public/yanel/trunk/src/webapp/global-resource-configs/user-forgot-pw_yanel-rc.xml
Modified:
public/yanel/trunk/src/contributions/resources/forgotpw/htdocs/forgotpw.xsl
public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java
public/yanel/trunk/src/webapp/xslt/login-screen.xsl
Log:
Made forgot-password functionality truely generic and overridable.
Also:
- added a link to the functionality from the (default) login screen
- apply the common Yanel styling (so that we e.g. get a "Go back to home page"
link)
Issue: 7164
Modified: public/yanel/trunk/src/contributions/resources/forgotpw/htdocs/forgotpw.xsl
===================================================================
--- public/yanel/trunk/src/contributions/resources/forgotpw/htdocs/forgotpw.xsl 2009-07-31 10:49:53 UTC (rev 43930)
+++ public/yanel/trunk/src/contributions/resources/forgotpw/htdocs/forgotpw.xsl 2009-07-31 13:33:37 UTC (rev 43931)
@@ -14,18 +14,16 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>I forgot my password!</title>
- <link type="text/css" href="{$yanel.back2realm}{$yanel.reservedPrefix}/yanel-css/global.css" rel="stylesheet"></link>
</head>
<body>
- <table id="bodytable" cellpadding="0" cellspacing="0"><tr><td id="title">
+ <h1>
I forgot my password!
- </td><td id="logo"><img src="{$yanel.back2realm}{$yanel.reservedPrefix}/yanel-img/yanel_header.png"/></td></tr><tr><td colspan="2" valign="top" width="100%"><div id="content">
+ </h1>
<xsl:apply-templates select="/yanel:yanel-forgotpw/yanel:requestemail"/>
<xsl:apply-templates select="/yanel:yanel-forgotpw/yanel:requestnewpw"/>
<xsl:apply-templates select="/yanel:yanel-forgotpw/yanel:show-message"/>
- </div></td></tr></table>
</body>
</html>
</xsl:template>
Copied: public/yanel/trunk/src/webapp/global-resource-configs/user-forgot-pw_yanel-rc.xml (from rev 43762, extra/imstat/yanel/res-configs/forgot-password.html.yanel-rc)
===================================================================
--- public/yanel/trunk/src/webapp/global-resource-configs/user-forgot-pw_yanel-rc.xml (rev 0)
+++ public/yanel/trunk/src/webapp/global-resource-configs/user-forgot-pw_yanel-rc.xml 2009-07-31 13:33:37 UTC (rev 43931)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0">
+ <yanel:rti name="forgotpw" namespace="http://www.wyona.org/yanel/resource/1.0"/>
+
+ <yanel:property name="change-password-requests-path" value="change-password-requests"/>
+ <yanel:property name="num-hrs-valid" value="1"/>
+
+ <!--Override this for your setup (cf. http://svn.wyona.com/repos/public/yanel/trunk/src/webapp/global-resource-configs/README.txt for rationale): -->
+ <yanel:property name="smtpHost" value="mail.wyona.com"/>
+ <yanel:property name="smtpPort" value="25"/>
+ <yanel:property name="smtpFrom" value="test at wyona.com"/>
+
+ <yanel:property name="xslt" value="rthtdocs:/forgotpw.xsl"/>
+ <yanel:property name="xslt" value="yanelhtdocs:/html.xslt"/>
+ <yanel:property name="mime-type" value="application/xhtml+xml"/>
+</yanel:resource-config>
Property changes on: public/yanel/trunk/src/webapp/global-resource-configs/user-forgot-pw_yanel-rc.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java
===================================================================
--- public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java 2009-07-31 10:49:53 UTC (rev 43930)
+++ public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java 2009-07-31 13:33:37 UTC (rev 43931)
@@ -1691,6 +1691,7 @@
//XXX: maybe we should use a configuration file instead!
java.util.Map<String, String> globalRCmap = new HashMap<String, String>();
globalRCmap.put("data-repository-sitetree.html", "data-repo-sitetree_yanel-rc.xml");
+ globalRCmap.put("user-forgot-pw.html", "user-forgot-pw_yanel-rc.xml");
final String admin = "admin/";
globalRCmap.put(admin + "list-groups.html", "user-mgmt/list-groups_yanel-rc.xml");
globalRCmap.put(admin + "list-users.html", "user-mgmt/list-users_yanel-rc.xml");
Modified: public/yanel/trunk/src/webapp/xslt/login-screen.xsl
===================================================================
--- public/yanel/trunk/src/webapp/xslt/login-screen.xsl 2009-07-31 10:49:53 UTC (rev 43930)
+++ public/yanel/trunk/src/webapp/xslt/login-screen.xsl 2009-07-31 13:33:37 UTC (rev 43931)
@@ -17,7 +17,7 @@
<xsl:template match="/">
<html>
<head>
- <title>Yanel - Login</title>
+ <title>Login - Yanel</title>
<link rel="stylesheet" href="{$yanel.back2realm}{$yanel.reservedPrefix}/yanel-css/global.css" type="text/css"/>
</head>
<body>
@@ -38,7 +38,7 @@
<xsl:apply-templates select="/yanel:yanel-auth-screen/yanel:message"/>
<form method="POST">
Username:<xsl:choose><xsl:when test="/yanel:yanel-auth-screen/yanel:login-default"><input type="text" name="yanel.login.username" value="{/yanel:yanel-auth-screen/yanel:login-default/@yanel:username}"/></xsl:when><xsl:otherwise><input type="text" name="yanel.login.username"/></xsl:otherwise></xsl:choose>
- Password:<input type="password" name="yanel.login.password"/>
+ Password:<input type="password" name="yanel.login.password"/> (<a href="{$yanel.back2realm}{$yanel.reservedPrefix}/user-forgot-pw.html">I forgot my password!</a>)
<xsl:choose><xsl:when test="/yanel:yanel-auth-screen/yanel:login-default"><input type="checkbox" name="remember-my-login-name" checked="checked"/></xsl:when><xsl:otherwise><input type="checkbox" name="remember-my-login-name"/></xsl:otherwise></xsl:choose> Remember my login name (for 1 day (<a href="">More info</a>). Uncheck if on a shared computer!)
<input type="submit" value="Login" name="regular-login"/>
</form>
More information about the Yanel-commits
mailing list