<%-- 
/**
  * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  * USA
  *
  * Component of: Red Hat Application Server
  * 
  * Initial Developers: Aizaz Ahmed
  *                     Vivek Lakshmanan
  *                     Andrew Overholt
  *                     Matthew Wringe
  *
  */
--%>


<%-- 
This page creates a form for a user to modify their
personal information.
--%>

<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>

<% request.setAttribute ( "page_title", "Edit Your Information" ); %>
<jsp:include page="../nav/Header.jsp" />

<%@ page contentType="text/html"
         import="olstore.framework.EJBHomeFactory"
%>

<% EJBHomeFactory factory= EJBHomeFactory.getInstance();%>
<SCRIPT LANGUAGE="JavaScript" SRC="moduser.js"></SCRIPT>

<div id="form">
	 <jsp:include page="../general/Messages.jsp" />

	<html:form action="/create/ModUser.do">
	<html:hidden property="submitType" value="new"/>


	<div class="formheader">
	<span>Account Information for <%= request.getRemoteUser() %> </span>
	</div>
	<jsp:include page="/general/UserForm.jsp"/>

	<div class="formheader">
		<span>Add and Remove Friends</span>
	</div>

	<div align="center">
		<table>
			<tr><th>All Users</th><th></th><th>Your Friends</th></tr>
			<tr><td>
			<html:select property="allUsersListSelected" size="10" multiple="true" style="WIDTH:200px"
				ondblclick="move(this.form.allUsersListSelected, this.form.friendsListSelected)">
			<html:options property="allUsersList"/>
			</html:select>
			</td><td>

			<table>
				<tr><td>
				<html:button value=">" property="AddFriends"
					onclick="move(this.form.allUsersListSelected, this.form.friendsListSelected)"/>
				</td></tr><tr><td>
				<html:button value="<" property="RemoveFriends"
					onclick="move(this.form.friendsListSelected, this.form.allUsersListSelected)"/>
				</td></tr>
			</table>

			</td><td>
			<html:select property="friendsListSelected" size="10" multiple="true" style="WIDTH:200px"
				ondblclick="move(this.form.friendsListSelected, this.form.allUsersListSelected)">
			<html:options property="friendsList"/>
			</html:select>
			</td></tr>
		</table>
	</div>



	<div class="formheader"><span></span></div>
	<div align="center">
		<html:submit value="Save"  onclick="this.form.submitType.value='Save';selectAll(this.form)"/>
		<html:submit value="Cancel" onclick="this.form.submitType.value='Cancel'"/>
	</div>
	<div class="formheader"><span></span></div>

	</html:form>

</div>




<jsp:include page="../nav/Footer.jsp" />



