AddConference: ajout de validation
Login: tentative de repérage de la touche entrée
This commit is contained in:
@@ -12,6 +12,22 @@
|
||||
<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>
|
||||
<script type="text/javascript">
|
||||
|
||||
var LoginManager = Class.create({
|
||||
initialize: function(inputField, inputField2){
|
||||
$(inputField).observe("keypress", this.KeyPressHandler.bindAsEventListener(this));
|
||||
$(inputField2).observe("keypress", this.KeyPressHandler.bindAsEventListener(this));
|
||||
},
|
||||
KeyPressHandler: function(event){
|
||||
switch(event.keyCode){
|
||||
case Event.KEY_RETURN:
|
||||
$('mainformlogin').submit();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<decorator:head />
|
||||
</head>
|
||||
|
||||
|
||||
@@ -30,25 +30,25 @@
|
||||
<td class="formLabel"><fmt:message key="conference2.article" />
|
||||
</td>
|
||||
<td><form:input onclick="ds_sh(this);" path="dateArticle"
|
||||
cssStyle="cursor: text" /> <form:errors path="dateArticle" /></td>
|
||||
cssStyle="cursor: text" /> <div class="formError"><form:errors path="dateArticle" /></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="formLabel"><fmt:message key="conference2.evaluation" />
|
||||
</td>
|
||||
<td><form:input onclick="ds_sh(this);" path="dateEvaluation"
|
||||
cssStyle="cursor: text" /> <form:errors path="dateEvaluation" />
|
||||
cssStyle="cursor: text" /> <div class="formError"><form:errors path="dateEvaluation" /></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="formLabel"><fmt:message key="conference2.start" />
|
||||
</td>
|
||||
<td><form:input onclick="ds_sh(this);" path="dateStart"
|
||||
cssStyle="cursor: text" /> <form:errors path="dateStart" /></td>
|
||||
cssStyle="cursor: text" /> <div class="formError"><form:errors path="dateStart" /></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="formLabel"><fmt:message key="conference2.end" /></td>
|
||||
<td><form:input onclick="ds_sh(this);" path="dateEnd"
|
||||
cssStyle="cursor: text" /> <form:errors path="dateEnd" /></td>
|
||||
cssStyle="cursor: text" /> <div class="formError"><form:errors path="dateEnd" /></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||
|
||||
<html>
|
||||
<head></head>
|
||||
<head>
|
||||
|
||||
<script type='text/javascript' src='./javascripts/prototype.js'></script>
|
||||
|
||||
<script type='text/javascript'>
|
||||
|
||||
function verifNumber() {
|
||||
var re = /^\d+$/;
|
||||
|
||||
if(!re.test($('pageNumber').value))
|
||||
$('errorNumber').style.display = "";
|
||||
else
|
||||
$('errorNumber').style.display = "none";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
@@ -21,8 +39,6 @@
|
||||
<p class="formHelp"><fmt:message key="conference.help.step3" /></p>
|
||||
|
||||
<form:form commandName="formConference" name="monForm">
|
||||
<div class="formErrors"><form:errors path="*" /></div>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -32,7 +48,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="formLabel">Page's numbers</td>
|
||||
<td><form:input path="pageNumber" /></td>
|
||||
<td><form:input id="pageNumber" path="pageNumber" onchange="verifNumber();"/><div class="formError"><span id="errorNumber" style="display: none;">It should be a number</span></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="formLabel">Authorized file types</td>
|
||||
@@ -60,7 +76,11 @@
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form:form>
|
||||
</form:form>
|
||||
|
||||
<script type="text/javascript">
|
||||
verifNumber();
|
||||
</script>
|
||||
|
||||
<a href="<c:url value="main.htm"/>">Home</a>
|
||||
|
||||
|
||||
@@ -104,11 +104,27 @@ function addClicked(eleid) {
|
||||
|
||||
function writePerson() {
|
||||
var person = { id:viewed, label:null, min:null, max:null };
|
||||
dwr.util.getValues(person);
|
||||
dwr.util.getValues(person);
|
||||
|
||||
var re = /^\d+$/;
|
||||
if(!re.test(person.min)) {
|
||||
dwr.util.setValues({errorMin:"It should be a number"});
|
||||
$('errorMin').style.display = "";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
$('errorMin').style.display = "none";
|
||||
|
||||
if(!re.test(person.max)) {
|
||||
dwr.util.setValues({errorMax:"It should be a number"});
|
||||
$('errorMax').style.display = "";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
$('errorMax').style.display = "none";
|
||||
|
||||
if (person.max <= person.min) {
|
||||
dwr.util.setValues({id:person.id, label:person.label, min:null, max:null });
|
||||
dwr.util.setValues({errorMax:"The max value should'nt be superior to the min value"});
|
||||
dwr.util.setValues({errorMax:"The min value shouldn't be superior to the max value"});
|
||||
$('errorMax').style.display = "";
|
||||
}
|
||||
else {
|
||||
@@ -160,8 +176,6 @@ var CritereManager = Class.create({
|
||||
<fmt:param value="4" />
|
||||
<fmt:param value="5" />
|
||||
</fmt:message>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<p class="formHelp"><fmt:message key="conference.help.step4" /></p>
|
||||
<form:form commandName="formConference" name="monForm">
|
||||
@@ -201,12 +215,13 @@ var CritereManager = Class.create({
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Min:</td>
|
||||
<td><input id="min" type="text" /></td>
|
||||
<td><input id="min" type="text" /></td>
|
||||
<td><div class="formError"><span id="errorMin" style="display: none;"></span></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Max:</td>
|
||||
<td><input id="max" type="text" /></td>
|
||||
<td><span id="errorMax"></span></td>
|
||||
<td><div class="formError"><span id="errorMax" style="display: none;"></span></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><span id="id"
|
||||
@@ -216,10 +231,7 @@ var CritereManager = Class.create({
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
new CritereManager('label', 'min', 'max');
|
||||
</script></td>
|
||||
<script type="text/javascript"> new CritereManager('label', 'min', 'max');</script></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="formLabel">Criteria list for this conference</td>
|
||||
|
||||
@@ -132,7 +132,7 @@ function filterUser(el, value) {
|
||||
<tr>
|
||||
<td class="formLabel"><fmt:message key="conference5.findUsers" />
|
||||
</td>
|
||||
<td>Filter <form:input id="myfilter" path="myfilter" /> <br />
|
||||
<td><form:input id="myfilter" path="myfilter" /> <br />
|
||||
<br />
|
||||
<table border="1" id="tableName" style="display: none;">
|
||||
<thead>
|
||||
@@ -154,7 +154,7 @@ function filterUser(el, value) {
|
||||
<tr>
|
||||
<td class="formLabel"><fmt:message key="conference5.usersList" />
|
||||
</td>
|
||||
<td>
|
||||
<td><br />
|
||||
<table border="1" id="tableNameAdded" style="display: none;">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -175,7 +175,7 @@ function filterUser(el, value) {
|
||||
<tr>
|
||||
<td class="formLabel"><fmt:message
|
||||
key="conference5.invitation.send" /></td>
|
||||
<td>eMail: <input id="emailAddress" type="text" /> <input
|
||||
<td><input id="emailAddress" type="text" /> <input
|
||||
type="button" name="inviteButton" id="inviteButton" value="Invite" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -23,13 +23,14 @@
|
||||
</td><td>
|
||||
<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 />
|
||||
<form action="<c:url value='j_acegi_security_check'/>" method="POST" id="mainformlogin">
|
||||
<fmt:message key="login.label.login" /> : <input id="username" type='text' name='j_username' /><br />
|
||||
<fmt:message key="login.label.password" /> : <input id="password" type='password' name='j_password' /><br />
|
||||
<input type="checkbox" name="_acegi_security_remember_me"/> <fmt:message key='login.label.rememberme' /><br />
|
||||
|
||||
<br /><br />
|
||||
<a href="javascript:document.getElementById('formlogin').submit();" id="submit_btn"><fmt:message key="login.btn.connexion" /></a>
|
||||
<a href="javascript:document.getElementById('mainformlogin').submit();" id="submit_btn"><fmt:message key="login.btn.connexion" /></a>
|
||||
<script type="text/javascript"> new LoginManager('username', 'password');</script>
|
||||
</form>
|
||||
<div class="yacos_button">
|
||||
<a href="<c:url value="/forgotPassword.htm"/>">
|
||||
@@ -39,5 +40,6 @@
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user