<%@ page language="java" buffer="100kb" errorPage="/common/error.jsp"%>
<%@ page import="org.apache.struts.Globals" %>

<%@ taglib uri="struts-bean"  prefix="bean"  %>
<%@ taglib uri="struts-html"  prefix="html"  %>
<%@ taglib uri="struts-logic" prefix="logic" %>
<%@ taglib uri="vkc-taglib"   prefix="vkc"   %>

<vkc:checkLogin />
<vkc:init/>
<html:html locale="true">
<head>

	<vkc:cssinclude />

    <meta http-equiv="content-type"  content="text/html; charset=iso-8859-1" />
	<script type="text/javascript" src="<vkc:rewrite page='/common/utils.js'/>"></script>

    <script type="text/javascript">

	window.name = "MAINVIEW";

	function init(){ 
	}
 	
    </script> 
</head>
<body onload="init();" topmargin="0" marginheight="0">
<table width="100%" cellspacing="1" cellpadding="5" border="0">
  <html:form action="/userPasswordChange" method="post">

  <bean:define id="form" name="userPasswordChangeForm" scope="request" type="vkc.profile.form.UserPasswordChangeForm"/>

  <tr><td height="3"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" height="3" width="30"/></td></tr>

  <tr>
    <td width="100%" align="center" valign="center">
	  <table width="400" align="center" cellpadding="0" cellspacing="5" border="0">
        <logic:present name="<%=Globals.ERROR_KEY%>">
        <tr><td align="left" nowrap="nowrap" colspan="2"><font color="red"><b><vkc:errors/></b></font></td></tr>
        </logic:present>
		
		<tr>
          <td width="0" align="left" nowrap="nowrap" colspan="2"><b><vkc:message key="vkc.profile.userpasswordchange" /></td>
        </tr>

        <vkc:hline colspan="5" lineClass="hline" lineHeight="1" topSpace="5" bottomSpace="5"/>

		<tr>
		  <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.oldpassword"/>:</b></td>
		  <td width="100%" align="left"><html:password property="oldpassword" style="width:100%;" size="35"/></td>
		</tr>
		
        <vkc:hline colspan="5" lineClass="hline" lineHeight="1" topSpace="5" bottomSpace="5"/>
        
		<tr>
		  <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.newpassword"/>:</b></td>
		  <td width="100%" align="left"><html:password property="newpassword" style="width:100%;" size="35"/></td>
		</tr>
		
		<tr>
		  <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.repassword"/>:</b></td>
		  <td width="100%" align="left"><html:password property="repassword" style="width:100%;" size="35"/></td>
		</tr>
        
	    <logic:equal name="form" property="passwordChanged" value="true">
		<tr>
		  <td align="left" nowrap="nowrap"><b>&nbsp;</b></td>
		  <td width="100%" align="left" nowrap="nowrap"><b><vkc:message key="vkc.profile.userpasswordchange.successMessage"/></b></td>
		</tr>
        </logic:equal>

        <vkc:hline colspan="5" lineClass="hline" lineHeight="1" topSpace="5" bottomSpace="5"/>

        <tr>
		  <td align="center" colspan="2">
            <logic:equal name="form" property="passwordChanged" value="false">
            <vkc:button property="action.change.user.password" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="vkc.profile.button.changePassword"/></vkc:button>&nbsp;
            </logic:equal>
            <vkc:button property="action.back" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.back"/></vkc:button>
          </td>
		</tr>
	  </table>
    </td>
  </tr>
  </html:form>
</table>
</body>
</html:html>
