home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 July
/
CMCD0703.ISO
/
Software
/
Freeware
/
Programare
/
bugzero
/
jsp
/
prefs.jsp
< prev
next >
Wrap
Text File
|
2003-06-09
|
3KB
|
89 lines
<%@ page
import="com.websina.bean.*,com.websina.util.*,com.websina.util.log.Log"
%>
<html>
<head>
<head><title>User Preferences</title>
<script LANGUAGE="JavaScript" src="script/utils.js"></script>
</head>
<body topmargin=0>
<%@ include file="_cache.jspf" %>
<%@ include file="_header.jspf" %>
<%
String title = label.get("user_preferences");
String msg = request.getParameter("msg");
if (msg == null) {
msg = "";
} else {
msg = "<p>" + msg;
}
String tmp;
String msg_cancel = java.net.URLEncoder.encode(MessageCode.get("servlet.prefs.cancel"));
String requiredMark = "<font color=red>*</font>";
%>
<center>
<!-- the title part -->
<table bgcolor="#ffffff" cellpadding=0 cellspacing=0 width=100% border=0>
<tr bgcolor="#eeeeee"><td align=center height=30><font size=+1><b><%=title%></b></font>
</table>
<font color=red><b><%=msg%></b></font>
<p>
<form name="prefForm" method="post" action="<%=contextPath%>/servlet/prefs">
<table bgcolor="#dddddd" cellpadding=1 cellspacing=0 border=0>
<tr><td>
<table bgcolor="#ffffff" cellpadding=2 cellspacing=2 border=0>
<!-- the name part -->
<tr><td bgcolor="#efefef" colspan=2 align=center>
<b><%=label.get("username")%>:</b> <font color="#cccc00"><b><%=person.getUsername()%></b></font>
</td></tr>
<tr>
<td><b><%=label.get("password")%></b></td>
<td><input type=password name="password" size=32 maxlength=50></td>
</tr>
<tr>
<td><b><%=label.get("email")%></b><%=requiredMark%></td>
<%
tmp = person.getEmail();
if (tmp == null) tmp = "";
%>
<td><input type=text name="email" value="<%=tmp%>" size=32 maxlength=50></td>
</tr>
<tr>
<td><b><%=label.get("fullname")%></b><%=requiredMark%></td>
<%
tmp = person.getFullname();
if (tmp == null) tmp = "";
%>
<td><input type=text name="fullname" value="<%=tmp%>" size=32 maxlength=64></td>
</tr>
<tr height=32 valign=top>
<td><b><%=label.get("default_project")%></b> </td>
<td>
<select name="default_project">
<%=ListMaker.makeOptionList(person.getProjectList(), person.getProject()) %>
</select></td>
</tr>
<tr><td bgcolor="#efefef" colspan=2><b><%=label.get("signature")%></b></td></tr>
<tr><td colspan=2>
<textarea name=signature rows=5 cols=36 style="width: 100%;">
<%=HtmlParser.escapeTag(person.getSignature())%></textarea></td></tr>
<!-- finally the save/cancel buttons -->
<tr><td bgcolor="#efefef" colspan=2 align=center height=30>
<input type="button" value="<%=label.get("save_button")%>" onClick="
if(isEmpty(email,'Email is required')) return false;
if(!validEmail(email.value))return false;
if(isEmpty(fullname,'Full name is required')) return false;
submit();">
<input type="button" value="<%=label.get("cancel_button")%>" onClick="
location.href='prefs.jsp?msg=<%=msg_cancel%>';">
</td></tr>
</table>
</td></tr>
</table>
</form>
</center>
</body>
</html>