<?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='SITE-USER']">
<script type="text/javascript" src="/js/Admin/SiteUsers.js?{$version}.{$build}"/>
<form name="objectFrom" method="post" onsubmit="return validateForm();">

<xsl:attribute name="action"><xsl:value-of select="/SITEBUILDER-PAGE/VIEW-CONTENT/@ACTION"/></xsl:attribute>

<input type="hidden" id="siteId" name="siteId" >
	<xsl:attribute name="value"><xsl:value-of select="@SITE-ID"/></xsl:attribute>
</input>

<input type="hidden" id="userId" name="userId" >
	<xsl:attribute name="value"><xsl:value-of select="@USER-ID"/></xsl:attribute>
</input>

<fieldset class="sb-form-fieldset">
	<legend><xsl:value-of select="@LOGIN-TITLE"/></legend>
	<table border="0" width="100%" cellpadding="2" cellspacing="0">
		<tr>
			<td class="sb-formview-alternaterow">
				<xsl:apply-templates select="CONTROL[@NAME='name']" 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:apply-templates>
			</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:apply-templates>
			</td>
		</tr>

		<xsl:call-template name="PASSWORD-FORM"/>
		
	</table>
</fieldset>

<fieldset class="sb-form-fieldset">
	<legend><xsl:value-of select="@MAIN-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: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:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='company']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='phoneNumber']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='address1']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='address2']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='city']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='state']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='country']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
		<tr>
			<td class="sb-formview-row">
				<xsl:apply-templates select="CONTROL[@NAME='zip']" mode="TITLE-LEFT">
					<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
				</xsl:apply-templates>
			</td>
		</tr>
	</table>
</fieldset>
</form>

<xsl:call-template name="OK-CANCEL-BUTTONS">
	<xsl:with-param name="okAction">if(validateForm()){document.forms.objectFrom.submit();}</xsl:with-param>
	<xsl:with-param name="cancelAction">document.location.href="<xsl:value-of select="$baseUrl"/>/Admin/Site/User/List?siteId=<xsl:value-of select="@SITE-ID"/>";</xsl:with-param>
</xsl:call-template>
	
</xsl:template>

</xsl:stylesheet>