<%@ Page Title="" Language="C#" MasterPageFile="~/SiteMaster.Master" AutoEventWireup="true" CodeBehind="EmailTemplatePage.aspx.cs" Inherits="MKInsight.Online.ActionTracking.ConfigurationPages.EmailTemplatePage" %>

<%@ Register Src="../UIControls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Assembly="UIWebControls" Namespace="UIWebControls" TagPrefix="cc4" %>
<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc2" %>
<%@ Register Src="../UIControls/PopupMessageBox.ascx" TagName="PopupMessageBox" TagPrefix="uc3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script   type="text/javascript">

        document.onkeypress = keyPress;

        function keyPress() {
            if (window.event.keyCode == 13) {
                event.returnValue = false;
                event.cancel = true;
            }
        }
    </script>
    <style type="text/css">
        SPAN.dataField
        {
            font-weight: bold;
            color: whitesmoke;
            background-color: cornflowerblue;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c_M" runat="server">

    <asp:Literal ID="lit_Script" runat="server"></asp:Literal>
    <uc1:Header ID="usc_Header" runat="server" />

    <uc2:MessageBox ID="usc_M" runat="server" />


    <asp:Panel ID="tbP" runat="server" CssClass="toolbar">

        <asp:LinkButton runat="server" ID="tbl_New" Style="background: url(../images/add32.png); background-position-y: 2px; background-repeat: no-repeat;" OnClick="OnNew">
            <asp:Label ID="tbl_NewLabel" runat="server"></asp:Label>

        </asp:LinkButton>

    </asp:Panel>

    <table id="tb_RiskUniverse" runat="server" width="100%">


        <tr>
            <td class="left" style="width: 290px;vertical-align:top;" >
                <asp:Panel ID="pt" runat="server" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"
                    Height="520px" ScrollBars="Both">
                    <asp:TreeView ID="tr" runat="server" BackColor="White" BorderColor="DimGray" NodeIndent="10"
                        ImageSet="Simple" OnSelectedNodeChanged="OnTreeNodeChanged">
                        <ParentNodeStyle Font-Bold="False" />
                        <HoverNodeStyle Font-Underline="True" ForeColor="#DD5555" />
                        <SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px" VerticalPadding="0px"
                            ForeColor="#DD5555" />
                        <NodeStyle  Font-Size="8pt" ForeColor="Black" HorizontalPadding="0px"
                            NodeSpacing="0px" VerticalPadding="0px" />
                    </asp:TreeView>
                </asp:Panel>
            </td>
            <td class="left" colspan="2" style="vertical-align:top;">
                <asp:Panel ID="pv" runat="server" Visible="False">
                    <table>
                        <tr>
                            <td class="left" colspan="2" style="height: 20px" style="vertical-align:top;">
                                <uc3:PopupMessageBox ID="usc_P" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td  >
                                <asp:Label ID="lbl_Name" runat="server" Text="Name:"></asp:Label>
                                <asp:Label ID="lbl_mN" runat="server" CssClass="mandatory" Font-Bold="False" Font-Size="Small"
                                    ForeColor="Red">*</asp:Label>
                            </td>
                            <td class="amend_field">
                                <asp:TextBox ID="txt_Name" runat="server" CssClass="amend" MaxLength="255" Width="450px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td  >
                                <asp:Label ID="lbl_Sender" runat="server" Text="Sender:"></asp:Label>
                                <asp:Label ID="lbl_mS" runat="server" CssClass="mandatory" Font-Bold="False" Font-Size="Small"
                                    ForeColor="Red">*</asp:Label>
                            </td>
                            <td class="amend_field">
                                <asp:TextBox ID="txt_Sender" runat="server" CssClass="amend" MaxLength="255" Width="450px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td  >
                                <asp:Label ID="lbl_SenderName" runat="server" Text="Sender Name:"></asp:Label>
                                <asp:Label ID="lbl_mSN" runat="server" CssClass="mandatory" Font-Bold="False" Font-Size="Small"
                                    ForeColor="Red">*</asp:Label>
                            </td>
                            <td class="amend_field">
                                <asp:TextBox ID="txt_SenderName" runat="server" CssClass="amend" MaxLength="255"
                                    Width="450px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td  >
                                <asp:Label ID="lbl_Subject" runat="server" Text="Subject:"></asp:Label>
                            </td>
                            <td class="amend_field">
                                <asp:TextBox ID="txt_Subject" runat="server" CssClass="amend" MaxLength="255" Width="450px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td  >
                                <asp:Label ID="lbl_Type" runat="server" Text="Type:"></asp:Label>
                            </td>
                            <td class="amend_field">
                                <asp:DropDownList ID="drp_Type" runat="server" AutoPostBack="True"
                                    OnSelectedIndexChanged="OnTypeChanged">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td   colspan="2">
                                <asp:CheckBox ID="mki_SetAsDefault" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td  >
                                <asp:Label ID="lbl_body" runat="server" Text="Email Body:"></asp:Label>
                            </td>
                            <td class="amend_field">
                                <cc4:HtmlEditor ID="ce_Template" runat="server" Height="400px" Width="550px" Toolbars="Bold,Italic,Underline:Left,Center,Right,Justify|OrderedList,BulletedList|Indent"
                                    AllowedAttributes="class,href,target,src,align,valign,color,size,style,face,dir,alt,title,span,contenteditable,unselectable"
                                    AllowedTags="p,b,i,u,em,big,small,div,img,span,blockquote,code,pre,br,hr,ul,ol,li,del,ins,strong,a,font,dl,dd,dt,h1,h2,h3,h4,h5,h6,address,sub,sup,span,class,contenteditable,unselectable"
                                    ReplaceNoBreakSpace="True" Font-Names="Arial" AutoSave="true" SaveButtons="btn_Update,btn_AddField"
                                    ToggleMode="None" DesignModeEmulateIE7="False" Font-Size="10pt" />
                            </td>
                            <td style="vertical-align:top;">
                                <div class="divfleft">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="left" colspan="2">
                                <hr class="ee" />
                                <table>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lbl_DataField" runat="server" Text="Add Data fields"></asp:Label>

                                        </td>
                                        <td>
                                            <asp:DropDownList ID="drp_DataField" runat="server">
                                            </asp:DropDownList>
                                            <asp:Button ID="btn_AddField" runat="server" Text="Add Data Field"
                                                OnClick="OnAddFields" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:Label ID="lbl_Info" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class="amend_label_opt" colspan="2">
                                <hr class="ee" />
                            </td>
                        </tr>
                        <tr>
                            <td class="left" colspan="2">
                                <asp:Button ID="btn_Add" runat="server" Text="Add" OnClick="OnAdd" />
                                <asp:Button ID="btn_Update" runat="server" Text="Update" OnClick="OnUpdate" />
                                <asp:Button ID="btn_Delete" runat="server" Text="Delete" OnClick="OnDelete" />
                                <asp:Button ID="btn_Cancel" runat="server" Text="Cancel" OnClick="OnCancel" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
    </table>
    <p>
        <asp:LinkButton ID="lnk_Close" runat="server" Font-Bold="True" Font-Size="Medium">Close</asp:LinkButton>
    </p>

</asp:Content>
