﻿<?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="SectionName" select="Brand/HeaderFooterHTML/SectionName"></xsl:variable>
        <xsl:variable name="BrandID" select="Brand/HeaderFooterHTML/BrandID"></xsl:variable>
        <xsl:variable name="BrandTabID" select="Brand/HeaderFooterHTML/BrandTabID"></xsl:variable>
        <xsl:variable name="BrandProfileSectionID" select="Brand/HeaderFooterHTML/BrandProfileSectionID"></xsl:variable>
        <xsl:variable name="SortOrder" select="Brand/HeaderFooterHTML/SortOrder"></xsl:variable>
        <xsl:variable name="TimeStamp" select="Brand/HeaderFooterHTML/TimeStamp"></xsl:variable>
        <xsl:variable name="BrandPermissionID" select="Brand/HeaderFooterHTML/BrandPermissionID"></xsl:variable>

        <div id="divHeaderFooterHTML">
            <xsl:if test="$BrandPermissionID = 4">
                <input type="Button" class="button" value="Add {$SectionName}"
                       onclick="Brand_SectionEdit('divHeaderHTMLContainer','divBrandHeaderFooterProfileOperations');">
                </input>
            </xsl:if>
        </div>

        <div id="divBrandHeaderFooterProfileOperations" class="divEdit">
            <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="txtTitle" 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="txtSectionHTML_{$TimeStamp}" style="width:100%; height:350px;" class="textAreaBox mceEditor">
                        </textarea>
                    </td>
                </tr>
                <tr>
                    <td style="width:15%">
                        <span class="labelSize10" >
                            Summary:
                        </span>
                    </td>
                    <td style="width:85%">
                        <textarea rows="4" id="txtSummary" style="width:100%;" class="textAreaBox">
                        </textarea>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td style="padding-top: 10px; padding-bottom: 10px;">
                        <input type="button" value="Save" class="button"
                               onclick="BrandStore_addBrandHeaderFooter({$BrandID}, {$BrandTabID}, {$BrandProfileSectionID}, {$SortOrder},'{$SectionName} ', 'txtTitle', 'txtSectionHTML_{$TimeStamp}', 'txtSummary', 'divHeaderHTMLContainer');"/>
                    </td>
                </tr>
            </table>
        </div>
    </xsl:template>
</xsl:stylesheet>
