<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--  $Id$  -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
	xmlns:dyn="http://exslt.org/dynamic"
	xmlns:set="http://exslt.org/sets" extension-element-prefixes="dyn set">

	<xsl:template name="priceEditLayout">
		<script type="text/javascript" src="/production/javascript/validatePrice.js?t={$now}" />
		<form name="regionEdit" id="priceEdit" method="post" action="price">
			<xsl:call-template name="priceEdit" />
			<xsl:call-template name="buttons" />
		</form>
	</xsl:template>

	<xsl:template name="priceEdit">
			<xsl:call-template name="openRunStatusMessage" />
			<xsl:call-template name="successMessageGeneral">
				<xsl:with-param name="successMessage">Price successfully created!</xsl:with-param>
			</xsl:call-template>
			<xsl:if test="Params/_inline">
				<input type="hidden" name="_inline" value="1" />
			</xsl:if>
			<xsl:if test="not(normalize-space(Form/Price/PriceID))">
				<input type="hidden" name="ReturnTo" id="ReturnTo" />
			</xsl:if>
			<input type="hidden" name="formSubmit" value="1" />
			<input type="hidden" name="c" value="edit" />
			<xsl:if test="normalize-space(Form/Price/PriceID)">
				<input type="hidden" name="PriceID" value="{Form/Price/PriceID}" />
			</xsl:if>
			<xsl:call-template name="errorMessageGeneral" />
			<p class="User-edit-subheader">
				Enter price information here.
				<span class="Required-notice"/>
			</p>
			<xsl:call-template name="column1Edit" />
	</xsl:template>

	<xsl:template name="column1Edit">
		<fieldset class="User-edit-fieldset">
			<div class="Form-item Form-item-required">
				<label class="Form-label">
					<span class="Form-label-caption">Name</span>
					<div class="Form-input-wrapper">
						<input type="text" class="Input Form-input" name="Form_Price_Name" id="Form_Price_Name" value="{Form/Price/Name}">
							<xsl:if test="$openRuns = 1">
								<xsl:attribute name="disabled">disabled</xsl:attribute>
							</xsl:if>
						</input>
						<xsl:call-template name="inlineError">
							<xsl:with-param name="path">Form/Price/Name</xsl:with-param>
							<xsl:with-param name="displayName">Name</xsl:with-param>
						</xsl:call-template>
					</div>
				</label>
			</div>
			<div class="Form-item Form-item-required">
				<label class="Form-label">
					<span class="Form-label-caption">Retail Price</span>
					<div class="Form-input-wrapper">
						<input type="text" class="Input Form-input" name="Form_Price_Retail" id="Form_Price_Retail" value="{Form/Price/Retail}">
							<xsl:if test="$openRuns = 1">
								<xsl:attribute name="disabled">disabled</xsl:attribute>
							</xsl:if>
						</input>
						<xsl:call-template name="inlineError">
							<xsl:with-param name="path">Form/Price/Retail</xsl:with-param>
							<xsl:with-param name="displayName">Retail Price</xsl:with-param>
						</xsl:call-template>
					</div>
				</label>
			</div>
			<div class="Form-item Form-item-required">
				<label class="Form-label">
					<span class="Form-label-caption">Wholesale Price</span>
						<div class="Form-input-wrapper">
						<input type="text" class="Input Form-input" name="Form_Price_Wholesale" id="Form_Price_Wholesale" value="{Form/Price/Wholesale}">
							<xsl:if test="$openRuns = 1">
								<xsl:attribute name="disabled">disabled</xsl:attribute>
							</xsl:if>
						</input>
						<xsl:call-template name="inlineError">
							<xsl:with-param name="path">Form/Price/Wholesale</xsl:with-param>
							<xsl:with-param name="displayName">Wholesale Price</xsl:with-param>
						</xsl:call-template>
					</div>
				</label>
			</div>
		</fieldset>
	</xsl:template>

</xsl:stylesheet>
