﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template name="BrandMemo">
        <xsl:param name="BrandProfileID" select="'N/A'"></xsl:param>
        <xsl:param name="BrandID" select="'N/A'"></xsl:param>
        <xsl:param name="BrandTabID" select="'N/A'"></xsl:param>
        <xsl:param name="BrandProfileSectionID" select="'N/A'"></xsl:param>
        <xsl:param name="SortOrder" select="'N/A'"></xsl:param>
        <xsl:param name="Section" select="'N/A'"></xsl:param>
        <xsl:param name="SectionName" select="'N/A'"></xsl:param>
        <xsl:param name="SectionHTML" select="'N/A'"></xsl:param>
        <xsl:param name="SectionSummary" select="'N/A'"></xsl:param>
        <xsl:param name="TimeStamp" select="'N/A'"></xsl:param>
        <xsl:param name="BrandPermissionID" select="'N/A'"></xsl:param>
        <xsl:param name="DivOperationID" select="'N/A'"></xsl:param>
        <xsl:param name="DivContainerID" select="'N/A'"></xsl:param>


        <table class="tableMaster">
            <tr>
                <td colspan="2" style="text-align:right">
                    <span onclick="CloseWindow('{$DivOperationID}'); 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_{$BrandProfileSectionID}" style="width:100%;"
                           class="text" maxlength="50" value="{$SectionName}"></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}_{$BrandProfileSectionID}"
                              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="txtSummary_{$BrandProfileSectionID}" style="width:100%;" class="textAreaBox">
                        <xsl:value-of select="$SectionSummary"/>
                    </textarea>
                </td>
            </tr>
            <tr>
                <td></td>
                <td style="padding-top: 10px; padding-bottom: 10px;">
                    <xsl:choose>
                        <xsl:when test="$BrandProfileID = ''">
                            <input type="button" value="Save" class="button"
                                   onclick="BrandStore_addBrandHeaderFooter(
                                                               {$BrandID}, 
                                                               {$BrandTabID}, 
                                                               {$BrandProfileSectionID}, 
                                                               {$SortOrder},
                                                               '{$SectionName}', 
                                                               'txtTitle_{$BrandProfileSectionID}', 
                                                               'txtSectionHTML_{$TimeStamp}_{$BrandProfileSectionID}', 
                                                               'txtSummary_{$BrandProfileSectionID}', 
                                                               '{$DivContainerID}');"/>
                        </xsl:when>
                        <xsl:otherwise>
                            <input type="button" value="Save" class="button"
                                   onclick="BrandStore_UpdateBrandHeaderFooter(
                                                               {$BrandID}, 
                                                               {$BrandTabID}, 
                                                               {$BrandProfileSectionID}, 
                                                               {$SortOrder},
                                                               '{$SectionName}', 
                                                               'txtTitle_{$BrandProfileSectionID}', 
                                                               'txtSectionHTML_{$TimeStamp}_{$BrandProfileSectionID}', 
                                                               'txtSummary_{$BrandProfileSectionID}', 
                                                               '{$DivContainerID}');"/>
                        </xsl:otherwise>
                    </xsl:choose>
                </td>
            </tr>
        </table>
    </xsl:template>
</xsl:stylesheet>
