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

	<xsl:template match="LICENSE-FORM">
		<style>
			.sb-pagetitle { border-bottom: solid 1px #776655; }
		</style>
		<script type="text/javascript" src="/js/Admin/License.js?{$version}.{$build}"/>
		
		<form name="restoreDefaultKeyForm" id="restoreDefaultKeyForm" method="post" action="{$baseUrl}/Admin/License/RestoreDefaultKey"/>
		
		<table width="100%" cellpadding="0" cellspacing="0"  border="0">
			<tr>
				<td class="sb-toolbarpadding"><xsl:apply-templates/></td>
			</tr>
		</table>
	</xsl:template>
	
	<xsl:template match="ACTIVATION-CARD-CONTENT">
		<form name="activateKey" method="POST" action="{$baseUrl}/Admin/License/Activate" onsubmit="javascript:return validateActivationForm();">
			<table width="100%" border="0">
				<tr>
					<td colspan="2">
						<fieldset class="sb-form-fieldset">
							<legend class="sb-label-toolbar-title"><xsl:value-of select="@TITLE"/></legend>
							<div style="width: 0; height: 10px;"><span></span></div>
							<xsl:value-of select="@DESCRIPTION"/>
							<div style="width: 0; height: 10px;"><span></span></div>
							<table cellpadding="0" cellspacing="0" border="0" class="control-title-input">
								<tr>
									<td class="title-block">
										<xsl:call-template name="LABEL" mode="label">
											<xsl:with-param name="id">activationCode</xsl:with-param>
											<xsl:with-param name="require">true</xsl:with-param>
											<xsl:with-param name="title" select="@ACT-CODE-TITLE"/>
											<xsl:with-param name="value" select="."/>
										</xsl:call-template>
										
									</td>
									<td class="input-block">
										<xsl:call-template name="INPUT" mode="control">
											<xsl:with-param name="id">activationCode</xsl:with-param>
											<xsl:with-param name="name">activationCode</xsl:with-param>
											<xsl:with-param name="onchange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
											<xsl:with-param name="require">true</xsl:with-param>
											<xsl:with-param name="size">60</xsl:with-param>
											<xsl:with-param name="value" select="."/>
										</xsl:call-template>
									</td>
									<td class="description-block"><div class="hint" style="white-space: nowrap;">(<xsl:value-of select="@EXAMPLE"/>: 9FFT00-OGEE19-LQAA56-QCCU99)</div></td>
								</tr>
							</table>
						</fieldset>
					</td>
				</tr>
				<tr>
					<td><xsl:call-template name="REQUIRED-FIELDS"/></td>
					<td align="right">
						<table onclick="" cellpadding="0" cellspacing="0" style="width:100px;cursor:pointer">
						<tr>
							<td align="right" style="padding:0px;">
								<xsl:apply-templates select="CONTROL[@TYPE='BUTTON']">
									<xsl:with-param name="action">javascript:return validateActivationForm();</xsl:with-param>
								</xsl:apply-templates>
							</td>
						</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</xsl:template>
	
	<xsl:template match="UPLOADKEY-CARD-CONTENT">
		<form name="uploadKey" method="POST" action="{$baseUrl}/Admin/License/Upload" enctype="multipart/form-data" onsubmit="javascript:return validateUploadForm();">
			<input type="hidden" name="MAX_FILE_SIZE">
				<xsl:attribute name="value"><xsl:value-of select="@MAX-FILE-SIZE"/></xsl:attribute>
			</input>
			
			<input type="hidden" id="savedFileName" name="savedFileName"/>
			
			<table cellpadding="0" cellspacing="0" width="100%" border="0">
				<tr>
					<td colspan="2">
						<fieldset class="sb-form-fieldset">
							<legend class="sb-label-toolbar-title"><xsl:value-of select="@TITLE"/></legend>
							
							<table cellpadding="0" cellspacing="0" border="0" class="control-title-input">
								<tr>
									<td class="title-block">
										<xsl:call-template name="LABEL" mode="label">
											<xsl:with-param name="id">sbUploadKey</xsl:with-param>
											<xsl:with-param name="require">true</xsl:with-param>
											<xsl:with-param name="title" select="@DESCRIPTION"/>
											<xsl:with-param name="value" select="."/>
										</xsl:call-template>
									</td>
									<td class="input-block">
										<xsl:call-template name="INPUT" mode="control">
											<xsl:with-param name="id">sbUploadKey</xsl:with-param>
											<xsl:with-param name="name">sbUploadKey</xsl:with-param>
											<xsl:with-param name="onchange">self.sbApplyChangesObject.registerChange();</xsl:with-param>
											<xsl:with-param name="require">true</xsl:with-param>
											<xsl:with-param name="size">60</xsl:with-param>
											<xsl:with-param name="type">file</xsl:with-param>
											<xsl:with-param name="value" select="."/>
										</xsl:call-template>
									</td>
								</tr>
							</table>
						</fieldset>
					</td>
				</tr>
				<tr>
					<td><xsl:call-template name="REQUIRED-FIELDS"/></td>
					<td align="right" style="padding-top: 4px;">
						<table onclick="" cellpadding="0" cellspacing="0" style="width:100px;cursor:pointer">
							<tr>
								<td align="right" style="padding:0px;">
									<xsl:apply-templates select="CONTROL[@TYPE='BUTTON']">
										<xsl:with-param name="action">javascript:return validateUploadForm();</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</xsl:template>

	<xsl:template match="RETRIVEKEY-CARD-CONTENT">
		<table cellpadding="0" cellspacing="0" width="100%" border="0">
			<tr>
				<td align="center" >
					<fieldset class="sb-form-fieldset">
					<div class="sb-label">
						<xsl:value-of select="@RESPONSE-TITLE"/>:<br/><xsl:value-of select="@RESPONSE"/>
					</div>
					</fieldset>
				</td>
			</tr>
				<tr>
					<td align="right">
						<table onclick="" cellpadding="0" cellspacing="0" style="width:100px;cursor:pointer; padding-top: 5px;">
						<tr>
							<td align="right" style="padding:0px;">
								<xsl:apply-templates select="CONTROL[@TYPE='BUTTON']">
									<xsl:with-param name="action">document.location.href="<xsl:value-of select="$baseUrl"/>/Admin/License";</xsl:with-param>
								</xsl:apply-templates>
							</td>
						</tr>
						</table>
					</td>
				</tr>
		</table>
	</xsl:template>
	
	
</xsl:stylesheet>