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

<xsl:template match="OBJECT[@TYPE='USER']">
	<style>
		.sb-pagetitle { border-bottom: solid 1px #776655; }
	</style>
<script type="text/javascript" src="/js/Admin/Users.js?{$version}.{$build}"/>
<form name="objectForm" method="post" action="{$baseUrl}" onsubmit="submitForm(); return false;">
<input type="hidden" id="action" name="action" value="/Admin/User/Create"/>

<fieldset class="sb-form-fieldset">
	<legend><xsl:value-of select="@TITLE"/></legend>
	<table border="0" width="100%" cellpadding="2" cellspacing="0">
		<tr>
			<td class="sb-formview-alternaterow">
				<xsl:apply-templates select="CONTROL[@NAME='firstName']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
					<xsl:with-param name="require">on</xsl:with-param>
					<xsl:with-param name="onChange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='lastName']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
					<xsl:with-param name="require">on</xsl:with-param>
					<xsl:with-param name="onChange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-alternaterow">
				<xsl:apply-templates select="CONTROL[@NAME='userName']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
					<xsl:with-param name="require">on</xsl:with-param>
					<xsl:with-param name="onChange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>

		<tr>
			<td id="rowPassword" class="sb-formview-row">
				<xsl:call-template name="INPUT-CONTROL" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
					<xsl:with-param name="title"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/PASSWORD"/></xsl:with-param>
					<xsl:with-param name="name">password</xsl:with-param>
					<xsl:with-param name="id">password</xsl:with-param>
					<xsl:with-param name="type">password</xsl:with-param>
					<xsl:with-param name="require">on</xsl:with-param>
					<xsl:with-param name="onChange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
				</xsl:call-template>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-alternaterow">
				<xsl:call-template name="INPUT-CONTROL" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
					<xsl:with-param name="title"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/CONFIRM-PASSWORD"/></xsl:with-param>
					<xsl:with-param name="name">confirmPassword</xsl:with-param>
					<xsl:with-param name="id">confirmPassword</xsl:with-param>
					<xsl:with-param name="type">password</xsl:with-param>
					<xsl:with-param name="require">on</xsl:with-param>
					<xsl:with-param name="onChange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
				</xsl:call-template>
			</td>
		</tr>

		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='email']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
					<xsl:with-param name="require">on</xsl:with-param>
					<xsl:with-param name="onChange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-alternaterow">
				<xsl:apply-templates select="CONTROL[@NAME='roleId' and @TYPE='COMBO-BOX']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
					<xsl:with-param name="onChange">javascript:onRoleChanged(); self.sbApplyChangesObject.registerChange();</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='planId' and @TYPE='COMBO-BOX']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
					<xsl:with-param name="onChange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-alternaterow">
				<xsl:apply-templates select="CONTROL[@NAME='isGoToSiteCreation' and @TYPE='CHECKBOX']" mode="TITLE-RIGHT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
					<xsl:with-param name="onChange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
	</table>
</fieldset>

<!-- input image needed for work default submit via Enter -->
<input type="image" style="border-width: 0px; height: 0px; width: 0px;"/>
</form>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td align="left" style="padding-left: 5px"><xsl:call-template name="REQUIRED-FIELDS"/></td>
		<td>
			<xsl:call-template name="OK-CANCEL-BUTTONS">
				<xsl:with-param name="okAction">submitForm();</xsl:with-param>
				<xsl:with-param name="cancelAction">document.location.href="<xsl:value-of select="$baseUrl"/>/Admin/User/List";</xsl:with-param>
			</xsl:call-template>
		</td>
	</tr>
</table>


</xsl:template>

</xsl:stylesheet>