<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:strip-space elements="*"/>
<xsl:output method="html" indent="yes" encoding="utf-8"/>
	
<xsl:template match="CHANGE-PASSWORD">
	<script type="text/javascript" src="/js/ChangePassword.js?{$version}.{$build}"/>
	
	<form name="changePasswordForm" method="post" id="changePasswordForm" action="{$baseUrl}/ChangePassword" onsubmit="submitForm(); return false;">
		<input type="hidden" name="userId">
			<xsl:attribute name="value"><xsl:value-of select="@USER-ID"/></xsl:attribute>
		</input>
		<input type="hidden" name="userPasswordHash">
			<xsl:attribute name="value"><xsl:value-of select="@USER-PASSWORD-HASH"/></xsl:attribute>
		</input>
		
		<table width="100%" border="0">
			<tr>
				<td align="center" style="padding-top: 40px" >
					<table cellspacing="0" cellpadding="0" border="0" class="sb-logintable">
							<tr><td class="sb-logintitle" colspan="2"><xsl:value-of select="CHANGE-PASSWORD"/></td></tr>
							<xsl:if test="../../STATUS">
								<tr>
									<td>
										<xsl:apply-templates select="../../STATUS" mode="admin">
											<xsl:with-param name="controlStyle">padding: 10px 10px 0px 10px;</xsl:with-param>
										</xsl:apply-templates>
									</td>
								</tr>
							</xsl:if>
							<tr>
								<td style="padding: 10px;">
									<table width="100%" border="0" >
										<tr>
											<td colspan="2" class="sb-login-description">
												<xsl:value-of select="DESCRIPTION"/>
											</td>
										</tr> 
										
										<tr>
											<td class="sb-login-control-title"><xsl:value-of select="CONTROL[@NAME='passwordInput']/@TITLE"/><span id="passwordInput_asterix" class="sb-asterix"> *</span></td>
											<td>
												<xsl:apply-templates select="CONTROL[@NAME='passwordInput']" mode="control">
													<xsl:with-param name="class">sb-login-control</xsl:with-param>
													<xsl:with-param name="type">password</xsl:with-param>
												</xsl:apply-templates>
											</td>
										</tr> 
										
										<tr>
											<td class="sb-login-control-title"><xsl:value-of select="CONTROL[@NAME='confirmationInput']/@TITLE"/><span id="confirmationInput_asterix" class="sb-asterix"> *</span></td>
											<td>
												<xsl:apply-templates select="CONTROL[@NAME='confirmationInput']" mode="control">
													<xsl:with-param name="class">sb-login-control</xsl:with-param>
													<xsl:with-param name="type">password</xsl:with-param>
												</xsl:apply-templates>
											</td>
										</tr>
										
										<tr>
											<td class="sb-login-description">
												<xsl:call-template name="REQUIRED-FIELDS"/>
											</td>
										
											<td nowrap="true" align="right">
												<table width="1%" border="0" cellpadding="0" cellpacing="0"> 
													<tr>
														<td>
															<xsl:call-template name="BUTTON-CONTROL">
																<xsl:with-param name="class">sb-login-control-button</xsl:with-param>
																<xsl:with-param name="title"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/CHANGE"/></xsl:with-param>
																<xsl:with-param name="action">javascript:submitForm();</xsl:with-param>
															</xsl:call-template>
														</td>
														<td>
															<xsl:call-template name="BUTTON-CONTROL">
																<xsl:with-param name="class">sb-login-control-button</xsl:with-param>
																<xsl:with-param name="title"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/CANCEL"/></xsl:with-param>
																<xsl:with-param name="action">document.location.href='<xsl:value-of select="$baseUrl"/>/Login';</xsl:with-param>
															</xsl:call-template>
														</td>
													</tr>
												</table>
												
												<!-- input image needed for work default submit via Enter -->
												<input type="image" style="border-width: 0px; height: 0px; width: 0px;"/>
											</td>
										</tr>									
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</xsl:template>

	<xsl:template match="SITEBUILDER-PAGE">
		<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; height: 100%">
			<tr>
				<td class="sb-adminpanel-header">
					<xsl:if test="NAVIGATION">
						<xsl:attribute name="colspan">2</xsl:attribute>
					</xsl:if>
					<xsl:call-template name="TOP-HEADER"/>
				</td>
			</tr>
			<tr>
				<td valign="top">
					<xsl:apply-templates select="VIEW-CONTENT/*"/>
				</td>
			</tr>
		</table>
	</xsl:template>
	
	<xsl:template name="MAIN-PAGE-CONTENT">
		<tr>
			<td valign="top">
				<xsl:apply-templates select="VIEW-CONTENT"/>
			</td>
		</tr>
	</xsl:template>
</xsl:stylesheet>