<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template name="editNotes">
        <div class="TrackerNotes">
            <form class="Form" action="/app/tracker" method="post" name="file_notes">
                <input type="hidden" name="c" value="notes" />
                <input type="hidden" name="sub_cmd" value="update" />
                <input type="hidden" name="file" value="{Params/file}" />
                <input type="hidden" name="page" value="{Params/page}" />
                <input type="hidden" name="period" value="{Params/period}" />

                <fieldset class="Form-fieldset TrackerNotes-common-info">
                    <xsl:variable name="trackerNotesCommonInfo">
                        <map>
                            <mapEntry>
                                <name>
                                    File Name
                                </name>
                                <value>
                                    <xsl:value-of select="File/OrigFileName"/>
                                </value>
                            </mapEntry>
                            <mapEntry>
                                <name>
                                    Service/Type
                                </name>
                                <value>
                                    <xsl:choose>
                                        <xsl:when test="File/ServiceID = 0">License Income</xsl:when>
                                        <xsl:otherwise>
                                            <xsl:value-of select="File/ServiceName" />
                                        </xsl:otherwise>
                                    </xsl:choose>
                                </value>
                            </mapEntry>
                            <mapEntry>
                                <name>
                                    Received
                                </name>
                                <value>
                                    <xsl:value-of select="File/DateCreatedPretty" />
                                </value>
                            </mapEntry>
                        </map>
                    </xsl:variable>

                    <xsl:call-template name="uiValuePair">
                        <xsl:with-param name="items" select="$trackerNotesCommonInfo" />
                    </xsl:call-template>
                </fieldset>
                <fieldset class="Form-fieldset">
                    <div class="Form-item">
                        <label class="Form-label">
                            <span class="Form-label-caption">Notes</span>
                            <div class="Form-input-wrapper">
                                <input
                                    type="text"
                                    name="notes"
                                    value="{File/Notes}"
                                    maxlength="255"
                                    id="streamDistributionFee_all"
                                    class="Form-input Input TrackerNotes-notes-input"
                                />
                            </div>
                        </label>
                    </div>
                </fieldset>
                <fieldset class="Form-fieldset Form-fieldset-buttons">
                    <xsl:call-template name="uiButton">
                        <xsl:with-param name="content" select="'Cancel'" />
                        <xsl:with-param name="type" select="'default'"/>
                        <xsl:with-param name="className" select="'Form-button'"/>
                        <xsl:with-param name="elemType" select="'button'"/>
                        <xsl:with-param name="onClick">
                            location.href='/app/tracker?page=<xsl:value-of select="Params/page" />&amp;period=<xsl:value-of select="Params/period" />'
                        </xsl:with-param>
                    </xsl:call-template>

                    <xsl:call-template name="uiButton">
                        <xsl:with-param name="content" select="'Update'" />
                        <xsl:with-param name="type" select="'primary'"/>
                        <xsl:with-param name="className" select="'Form-button'"/>
                        <xsl:with-param name="elemType" select="'submit'"/>
                    </xsl:call-template>
                </fieldset>
            </form>
        </div>
    </xsl:template>
</xsl:stylesheet>
