<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:eat="http://msqr.us/xsd/ieat"
	xmlns:xweb="http://msqr.us/xsd/jaxb-web"
	exclude-result-prefixes="eat xweb">
	
    <!-- imports -->
	<xsl:import href="tmpl/default-layout.xsl"/>
	
	<!-- layout variables -->
	<xsl:variable name="layout.global.nav.page" select="'logon'"/>
	
	
	<xsl:template match="xweb:x-data" mode="page-title">
		<xsl:value-of select="key('i18n','logon.title')"/>
	</xsl:template>
	
	<xsl:template match="xweb:x-data" mode="page-body">
        <div class="intro">
			<xsl:value-of select="key('i18n','logon.intro')"/>

			<xsl:if test="key('appenv','feature.registration') = 'true'">
				<xsl:text> </xsl:text>
				<xsl:value-of select="key('i18n','logon.intro.register')"/>
				<xsl:text> </xsl:text>
				<a href="{$web-context}/register.do">
				    <xsl:value-of select="key('i18n','logon.intro.register.link')"/>
				</a>
				<xsl:value-of select="key('i18n','logon.intro.register.close')"/>
			</xsl:if>
			
			<xsl:text> </xsl:text>
			<a href="{$web-context}/forgotPassword.do" title="{key('i18n','link.forgot-password.title')}">
			    <xsl:value-of select="key('i18n','link.forgot-password')"/>
			</a>
        </div>
        
		<form method="post" action="{$web-context}{$ctx/xweb:path}">
			<table class="form">
				<tr>
					<th>
						<xsl:value-of select="key('i18n','login.displayName')"/>
					</th>
					<td>
						<input type="text" name="login" maxlength="64"/>
					</td>
				</tr>
				<tr>
					<th>
						<xsl:value-of select="key('i18n','password.displayName')"/>
					</th>
					<td colspan="3">
						<input type="password" name="password" maxlength="64"/>
					</td>
				</tr>
				<tr>
					<th/>
					<td>
						<input type="submit" value="{key('i18n','logon.displayName')}"/>
					</td>
				</tr>
			</table>
		</form>
		<script type="text/javascript" xml:space="preserve">
			<xsl:comment>
			document.forms[0].elements['login'].focus();
			//</xsl:comment>
		</script>
	</xsl:template>
	
</xsl:stylesheet>
