Ajout de l'UC ForgotPassword

Modification CSS
Mise en place des blocs arondis (cbb)
Clarification interface pages login avec les blocs cbb
Correction articleController : validation
This commit is contained in:
2008-02-14 12:14:51 +00:00
parent 39dadefc43
commit e3f0133ffc
20 changed files with 395 additions and 38 deletions

View File

@@ -19,11 +19,12 @@ login.label.login=Login
login.label.password=Password
login.label.rememberme=Remember me
login.label.register=Register
login.label.alreadyaccount:I have already an account
login.label.alreadyaccount:I already have an account
# New user
login.label.createnewuser=Create an account
login.label.createaccount="When creating an account on Yacos.com, you may post an article and follow the conference."
login.label.continue=Continue
login.label.forgotPasswordHeading=Forgot your password ?
login.message.error=Your login attempt was not successful, try again.
###################
@@ -87,6 +88,15 @@ form.register.error.passwordEmpty=The password can't be empty
form.register.error.alreadyExists=A user with this login already exists. Please check you haven't already registered or change your login.
###################
# FORGOT USER
form.forgotPassword.error.emailInvalid=This email is invalid
form.forgotPassword.error.unknownEmail=This email is not registered in our system
form.forgotPassword.email=E-Mail address for your account :
form.forgotPassword.submit=Request new password
form.forgotPassword.help=Please enter the email address you used for your YACOS account.\nA new password will be generated and sent into your mailbox.
forgotPassword.title=Reset your password
###################
# MESSAGE ERROR
message.error.noconferenceforthisid=This conference doesn't exist. Pease try again

View File

@@ -11,6 +11,7 @@
<link rel="icon" type="image/png" href="./images/favicon.png" />
<title><fmt:message key="title" /></title>
<link rel="stylesheet" href="./stylesheets/base.css" type="text/css" />
<script type='text/javascript' src='./javascripts/rounded_boxes.js'></script>
<decorator:head />
</head>

View File

@@ -0,0 +1,28 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%>
<html>
<head>
</head>
<body>
<h4 class="title"><fmt:message key="forgotPassword.title" /></h4>
<p class="formHelp">
<fmt:message key="form.forgotPassword.help"/>
</p>
<div class="cbb">
<form:form commandName="forgotPassword">
<h2>
<form:label path="email">
<fmt:message key="form.forgotPassword.email"/>
</form:label>
</h2>
<form:input path="email"/>
<div class="formError">
<form:errors path="email"/>
</div>
<input type="submit" name="submit" value="<fmt:message key="form.forgotPassword.submit"/>"/>
</form:form>
</div>
</body>
</html>

View File

@@ -5,22 +5,23 @@
<body>
<h4 class="title">NO NAME</h4>
<c:forEach items="${listArticle}" var="article">
<ul class="article">
<li class="title"><b>${article.title}</b></li>
<li class="author">Author: <b>${article.mainAuthor.firstName} ${article.mainAuthor.lastName}</b></li>
<li class="secondaryAuthors">Secondary Authors:
<div class="article cbb">
<h2>${article.title}</h2>
<p class="author">Author: <b>${article.mainAuthor.firstName} ${article.mainAuthor.lastName}</b></p>
<p class="secondaryAuthors">
Secondary Authors:
<ul>
<c:forEach items="${article.secondaryAuthors}" var="sAuthor">
<li>${sAuthor}</li>
</c:forEach>
</ul>
</li>
<li class="topic">Topic: <b>${article.topic}</b></li>
<li class="article_url"><a href="
<c:url value="/download.htm">
<c:param name="articleId" value="${article.id}"/>
</c:url>">Download the article</a></li>
</ul>
</ul>
<p class="topic">Topic: <b>${article.topic}</b></p>
<p class="article_url"><a href="
<c:url value="/download.htm">
<c:param name="articleId" value="${article.id}"/>
</c:url>">Download the article</a>
</p>
</div>
<br />
<hr />
<br />

View File

@@ -32,7 +32,8 @@
</c:when>
<c:otherwise>
<c:forEach items="${listConference}" var="conference">
<div class="conferenceBloc">
<div class="conferenceBloc cbb">
<h2>${conference.title}</h2>
ID : ${conference.id}<br />
Title : ${conference.title}<br />
Description : ${conference.description}<br />

View File

@@ -15,11 +15,14 @@
<table width="100%">
<tr><td width="50%">
<fmt:message key="login.label.createnewuser" /><br />
<div class="cbb">
<h2><fmt:message key="login.label.createnewuser" /></h2>
<fmt:message key="login.label.createaccount" /><br />
<a href="registerUser.htm"><fmt:message key="login.label.continue" /></a>
<a href="registerUser.htm"><fmt:message key="login.label.register" /></a>
</div>
</td><td>
<fmt:message key="login.label.alreadyaccount" /> :<br />
<div class="cbb">
<h2><fmt:message key="login.label.alreadyaccount" /> :</h2>
<form action="<c:url value='j_acegi_security_check'/>" method="POST" id="formlogin">
<fmt:message key="login.label.login" /> : <input type='text' name='j_username' /><br />
<fmt:message key="login.label.password" /> : <input type='password' name='j_password' /><br />
@@ -28,7 +31,12 @@
<br /><br />
<a href="javascript:document.getElementById('formlogin').submit();" id="submit_btn"><fmt:message key="login.btn.connexion" /></a>
</form>
<div class="yacos_button">
<a href="<c:url value="/forgotPassword.htm"/>">
<fmt:message key="login.label.forgotPasswordHeading"/>
</a>
</div>
</div>
</td></tr>
</table>
</body>

View File

@@ -75,8 +75,10 @@
</prop>
<prop key="/listReport.htm">
ListReportController
</prop>
<prop key="/forgotPassword.htm">
ForgotPasswordController
</prop>
</props>
</property>
</bean>
@@ -117,6 +119,17 @@
<bean id="UserValidator"
class="org.yacos.web.system.validation.UserValidator">
</bean>
<bean id="ForgotPasswordController"
class="org.yacos.web.system.controller.ForgotPasswordController">
<property name="sessionForm" value="false" />
<property name="commandName" value="forgotPassword" />
<property name="commandClass"
value="org.yacos.web.system.form.FormForgotPassword" />
<property name="formView" value="forgotPassword" />
<property name="successView" value="forgotPassword.htm" />
<property name="userManager" ref="userManager" />
</bean>
<bean id="SArticleController"

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,74 @@
/*
cbb function by Roger Johansson, http://www.456bereastreet.com/
*/
var cbb = {
init : function() {
// Check that the browser supports the DOM methods used
if (!document.getElementById || !document.createElement || !document.appendChild) return false;
var oElement, oOuter, oI1, oI2, tempId;
// Find all elements with a class name of cbb
var arrElements = document.getElementsByTagName('*');
var oRegExp = new RegExp("(^|\\s)cbb(\\s|$)");
for (var i=0; i<arrElements.length; i++) {
// Save the original outer element for later
oElement = arrElements[i];
if (oRegExp.test(oElement.className)) {
// Create a new element and give it the original element's class name(s) while replacing 'cbb' with 'cb'
oOuter = document.createElement('div');
oOuter.className = oElement.className.replace(oRegExp, '$1cb$2');
// Give the new div the original element's id if it has one
if (oElement.getAttribute("id")) {
tempId = oElement.id;
oElement.removeAttribute('id');
oOuter.setAttribute('id', '');
oOuter.id = tempId;
}
// Change the original element's class name and replace it with the new div
oElement.className = 'i3';
oElement.parentNode.replaceChild(oOuter, oElement);
// Create two new div elements and insert them into the outermost div
oI1 = document.createElement('div');
oI1.className = 'i1';
oOuter.appendChild(oI1);
oI2 = document.createElement('div');
oI2.className = 'i2';
oI1.appendChild(oI2);
// Insert the original element
oI2.appendChild(oElement);
// Insert the top and bottom divs
cbb.insertTop(oOuter);
cbb.insertBottom(oOuter);
}
}
},
insertTop : function(obj) {
var oOuter, oInner;
// Create the two div elements needed for the top of the box
oOuter=document.createElement("div");
oOuter.className="bt"; // The outer div needs a class name
oInner=document.createElement("div");
oOuter.appendChild(oInner);
obj.insertBefore(oOuter,obj.firstChild);
},
insertBottom : function(obj) {
var oOuter, oInner;
// Create the two div elements needed for the bottom of the box
oOuter=document.createElement("div");
oOuter.className="bb"; // The outer div needs a class name
oInner=document.createElement("div");
oOuter.appendChild(oInner);
obj.appendChild(oOuter);
},
// addEvent function from http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html
addEvent : function(obj, type, fn) {
if (obj.addEventListener)
obj.addEventListener(type, fn, false);
else if (obj.attachEvent) {
obj["e"+type+fn] = fn;
obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
obj.attachEvent("on"+type, obj[type+fn]);
}
}
};
cbb.addEvent(window, 'load', cbb.init);

View File

@@ -1,3 +1,5 @@
/* @override http://localhost:8080/YACOSWeb/stylesheets/base.css */
/* @group RESET */
html,body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input { margin: 0; padding: 0; }
@@ -26,9 +28,24 @@ body {
font-size: 10px;
}
form {
display: block;
}
.formHelp {
padding: 5px;
border: thin solid #94ff90;
background-color: #dfffe4;
}
.formError{
color: #ff0000;
font-size: 10px;
}
.formError > * {
display: list-item;
list-style-position: inside;
list-style-image: url(../images/error_bullet.png);
}
/* @group Login */
@@ -138,7 +155,6 @@ body {
}
#maincontent {
position: relative;
color: #333;
}
@@ -212,13 +228,17 @@ body {
padding-right: 10px;
}
#maincontent > * {
margin-right: 10px;
}
#main #maincontent h4.title {
color: #fff;
font-weight: bold;
height: 23px;
position: relative;
top: 2px;
margin-bottom: 6px;
margin-left: 0;
}
/* @end */
@@ -298,4 +318,109 @@ body {
.selected {
background-color: #fea752;
}
/* @end */
/* @group general purpose */
.centered {
margin: auto;
}
/* @end */
/* @group rounded box */
.cb h2 {
margin-left: -11px;
margin-right: -11px;
padding-left: 10px;
padding-right: 10px;
border-color: #fd7738;
margin-bottom: 10px;
font-weight: bolder;
border-bottom: 2px solid #df9b7b;
}
/* Normal styling */
.cb {
margin:0.5em 0;
}
/* Top corners and border */
.bt {
height:19px;
margin:0 0 0 19px;
background:url(../images/box.png) no-repeat 100% 0;
}
.bt div {
position:relative;
left:-19px;
width:19px;
height:19px;
background:url(../images/box.png) no-repeat 0 0;
font-size:0;
line-height:0;
}
/* Bottom corners and border */
.bb {
height:19px;
margin:0 0 0 19px;
background:url(../images/box.png) no-repeat 100% 100%;
}
.bb div {
position:relative;
left:-19px;
width:19px;
height:19px;
background:url(../images/box.png) no-repeat 0 100%;
font-size:0;
line-height:0;
}
/* Left border */
.i1 {
padding:0 0 0 11px;
background:url(../images/borders.png) repeat-y 0 0;
}
/* Right border */
.i2 {
padding:0 11px 0 0;
background:url(../images/borders.png) repeat-y 100% 0;
}
/* Wrapper for the content. Use it to set the background colour and insert some padding between the borders and the content. */
.i3 {
display:block;
margin:0;
padding:1px 10px;
background:#fff;
}
/* Make the content wrapper auto clearing so it will contain floats (see http://positioniseverything.net/easyclearing.html). */
.i3:after {
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}
.i3 {display:inline-block;}
.i3 {display:block;}
/* Default CSS ends here */
/* @end */
/* @group yacos_button */
.yacos_button {
display: inline-block;
background-image: url(../images/button_background_idle.png);
max-height: 40px;
min-width: 50px;
padding:10px;
}
.yacos_button:hover {
background-image: url(../images/button_background_hover.png);
}
/* @end */