﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <xsl:variable name="Title" select="normalize-space(BrandSchedule/SectionTitle)"></xsl:variable>
        <xsl:variable name="SectionHTML" select="normalize-space(BrandSchedule/SectionHTML)"></xsl:variable>
        <xsl:variable name="SectionSummary" select="normalize-space(BrandSchedule/SectionSummary)"></xsl:variable>

        <xsl:variable name="BrandID" select="normalize-space(BrandSchedule/BrandID)"></xsl:variable>
        <xsl:variable name="BrandTabID" select="normalize-space(BrandSchedule/BrandTabID)"></xsl:variable>
        <xsl:variable name="TimeStamp" select="normalize-space(BrandSchedule/TimeStamp)"></xsl:variable>

        <div id="divEditBrandProfile_BrandSchedule">
            <table class="tableMaster">
                <tr>
                    <td colspan="2" style="text-align:right">
                        <span onclick="CloseWindow('divBrandProfileOperations'); closeBrandEditMode();" class="labelHeader link" style="color: Black">
                            [X]
                        </span>
                    </td>
                </tr>
                <tr>
                    <td style="width:15%">
                        <span class="labelSize10">
                            Title:
                        </span>
                    </td>
                    <td style="width:85%">
                        <input type="text" id="txtEditTitle" value="{$Title}" style="width:100%;" class="text" maxlength="50">
                        </input>
                    </td>
                </tr>
                <tr>
                    <td style="width:15%">
                        <span class="labelSize10" >
                            Section HTML:
                        </span>
                    </td>
                    <td style="width:85%">
                        <textarea rows="10" id="txtEditSectionHTML_{$TimeStamp}" style="width:100%; height:350px;" class="textAreaBox mceEditor">
                            <xsl:value-of select="$SectionHTML"/>
                        </textarea>
                    </td>
                </tr>
                <tr>
                    <td style="width:15%">
                        <span class="labelSize10" >
                            Summary:
                        </span>
                    </td>
                    <td style="width:85%">
                        <textarea rows="4" id="txtEditSummary" style="width:100%;" class="textAreaBox">
                            <xsl:value-of select="$SectionSummary"/>
                        </textarea>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td style="padding-top: 10px; padding-bottom: 10px;">
                        <input type="button" value="Update" class="button" onclick="BrandSchedule_UpdateBrandProfile({$BrandID}, {$BrandTabID}, 'txtEditTitle', 'txtEditSectionHTML_{$TimeStamp}', 
                              'txtEditSummary', 'divBrandProfile_Schedule');"/>
                    </td>
                </tr>
            </table>
        </div>

    </xsl:template>
</xsl:stylesheet>
