<%@ control language="VB" autoeventwireup="false" inherits="RCC_Exchange_CC_Disclaimer, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Assembly="obout_Editor" Namespace="OboutInc.Editor" TagPrefix="obout" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility"
    TagPrefix="CC" %>
<CC:UpdatePanelInlineScriptControl ID="UpdatePanelInlineScriptControl1" runat="server">
    <script type="text/javascript">
        function ChangeDLabel() {
            var CtrlDDL = document.getElementById('<%=Ddl_DisclaimerTo.ClientID%>');
            var CtrlApplyLabel = document.getElementById('<%=Lbl_ApplyLable.ClientID%>');

            if (CtrlDDL.value == '1') { // incoming
                CtrlApplyLabel.innerHTML = '<%= Resources.Content.ApplyRuleIfRecipientIs %>'; //"ApplyRuleIfRecipientIs";
            }
            else if (CtrlDDL.value == '2') {    // outgoing 
                CtrlApplyLabel.innerHTML = '<%= Resources.Content.strApplyThisRule %>'; // "Apply this rule if the sender is";
            }
        }

        <%--function EditorOnSubmit() {
            var editor = oboutGetEditorByClientId('<%=Editor1.ClientID%>');
            if (editor.getContent().length > 10) {
                setTimeout(function () { alert("Content's length is more than 10 characters!"); }, 0);
                return false;
            }
            return true;
        }--%>
    </script>
</CC:UpdatePanelInlineScriptControl>
<div class="row">
    <div class="col-xs-12" id="Div_Listing" runat="server">

        <div class="card Div_OpsRow" id="Div_Operations" runat="server">
            <div class="header">
                <h3><%= Resources.Content.GN00001320%></h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_AddDisclaimer" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,addDisclaimer%>" CausesValidation="false" />
                    </div>
                </div>
            </div>
        </div>

        <br />
        <div class="card">
            <%--<div class="header">
                <h3>
                    <asp:Literal ID="Literal5" runat="server" EnableViewState="false" Text="<%$ Resources:Content,addDisclaimer %>" />
                </h3>
            </div>--%>
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <asp:GridView ID="GV_Disclaimer" runat="server" AllowPaging="true" DataSourceID=""
                            CssClass="table table-bordered table-striped table-hover" AutoGenerateColumns="false" EmptyDataText="<%$ Resources:Content,GN00001375%>">
                            <Columns>
                                <asp:TemplateField HeaderText="<%$ Resources:Content,DisclaimerName%>" HeaderStyle-CssClass="col-xs-9" ItemStyle-CssClass="col-xs-9">
                                    <ItemTemplate>
                                        <asp:Label ID="Lbl_DisclaimerName" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="<%$ Resources:Content,SMI0423%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LB_Edit" runat="server" CssClass="btn btn-primary waves-effect" CommandName="editdisc"
                                            Text='<%$ Resources:Content, GN0000276 %>' CausesValidation="false"></asp:LinkButton>
                                        <asp:LinkButton ID="LB_Remove" runat="server" CssClass="btn btn-primary waves-effect btnAction" CommandName="removedisc"
                                            Text='<%$ Resources:Content, GN0000278 %>' CausesValidation="false"></asp:LinkButton>
                                        <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,CBE001%>"
                                            TargetControlID="LB_Remove">
                                        </EM:ConfirmButtonExtender>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <%--PagerTemplate Start--%>
                            <PagerTemplate>
                                <EM:Pager ID="Pager1" runat="server" />
                            </PagerTemplate>
                            <%--PagerTemplate End--%>
                        </asp:GridView>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-xs-12" id="Div_AddEdit" runat="server">
        <div class="card">
            <div class="header">
                <h3>
                    <asp:Literal ID="Ltl_Heading" runat="server" EnableViewState="false" Text="<%$ Resources:Content,addDisclaimer %>" />
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal57" runat="server" Text="<%$ Resources:Content,DisclaimerName%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_DisclaimerName" runat="server" />
                            </div>
                        </div>
                        <asp:RequiredFieldValidator ControlToValidate="TxBx_DisclaimerName" ID="RFV_TxBx_DisclaimerName" runat="server"
                            Display="None" ValidationGroup="Disclaimer"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:Content,DisclaimerTo%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="Ddl_DisclaimerTo" runat="server" onchange="ChangeDLabel();">
                                <asp:ListItem Text="<%$ Resources:Content, IncomingMessage%>" Value="1" />
                                <asp:ListItem Text="<%$ Resources:Content, OutgoingMessage%>" Value="2" />
                            </asp:DropDownList>
                        </div>
                    </div>
                </div>
                <div class="row" id="Div_ApplyRuleIf" runat="server">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Label ID="Lbl_ApplyLable" Text="<%$ Resources:Content,ApplyRuleIfRecipientIs%>" runat="server"></asp:Label>:
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="DDL_ApplyRuleIf" runat="server" />
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Content,strPrependDisclaimer%>" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:CheckBox ID="CB_PrependDisclaimer" runat="server" Text=" " />
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal90" runat="server" Text="<%$ Resources:Content, strDisclaimerText%>"
                                EnableViewState="false" />:</label>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <obout:Editor ID="Editor1" Submit="false" ShowWaitMessage="false" AjaxWait="false" runat="server" Appearance="custom" ShowQuickFormat="false">
                            <Buttons>
                                <obout:Select Name="FontName" />
                                <obout:Select Name="FontSize" />
                                <obout:HorizontalSeparator />
                                <obout:Toggle Name="Bold" />
                                <obout:Toggle Name="Italic" />
                                <obout:Toggle Name="Underline" />
                                <obout:Toggle Name="StrikeThrough" />
                                <obout:Toggle Name="SuperScript" />
                                <obout:Toggle Name="SubScript" />
                                <obout:HorizontalSeparator />
                                <obout:Method Name="ForeColor" />
                                <obout:Method Name="ForeColorClear" />
                                <obout:Method Name="BackColor" />
                                <obout:Method Name="BackColorClear" />
                                <obout:VerticalSeparator />
                                <obout:Method Name="Redo" />
                                <obout:Method Name="Undo" />
                                <obout:HorizontalSeparator />
                                <obout:Method Name="Cut" />
                                <obout:Method Name="Copy" />
                                <obout:Method Name="Paste" />
                                <obout:Method Name="PasteText" />
                                <obout:HorizontalSeparator />
                                <obout:Method Name="Paragraph" />
                                <obout:Method Name="GetFormat" />
                                <obout:Method Name="ApplyFormat" />
                                <obout:HorizontalSeparator />
                                <obout:Method Name="JustifyLeft" />
                                <obout:Method Name="JustifyCenter" />
                                <obout:Method Name="JustifyRight" />
                                <obout:Method Name="JustifyFull" />
                                <obout:HorizontalSeparator />
                                <obout:Method Name="OrderedList" />
                                <obout:Method Name="BulletedList" />
                                <obout:HorizontalSeparator />
                                <obout:Method Name="InsertHR" />
                                <obout:Method Name="CreateLink" />
                                <obout:Method Name="InsertAnchor" />
                                <obout:Method Name="InsertIMG" />
                                <obout:HorizontalSeparator />
                                <obout:Method Name="ClearStyles" />
                            </Buttons>
                        </obout:Editor>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12"></div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="DDL_CompanyVariablesHtml" runat="server">
                                <asp:ListItem Text="<%$ Resources:Content, FAM0056%>" Value="0" />
                                <asp:ListItem Text="<%$ Resources:Content, GN0000880%>" Value="%%City%%" />
                                <asp:ListItem Text="<%$ Resources:Content, GN00001077%>" Value="%%Company%%" />
                                <asp:ListItem Text="<%$ Resources:Content, FAM0058%>" Value="%%CountryOrRegion%%" />
                                <asp:ListItem Text="<%$ Resources:Content, GN0000374%>" Value="%%Department%%" />
                                <asp:ListItem Text="<%$ Resources:Content, GN00001113%>" Value="%%DisplayName%%" />
                                <%--<asp:ListItem Text="<%$ Resources:Content, DGN1110432%>" Value="%%DomainController%%" />--%>
                                <%--<asp:ListItem Text="<%$ Resources:Content, GN0000491%>" Value="%%PrimarySmtpAddress%%" />--%>
                                <asp:ListItem Text="<%$ Resources:Content, GN0000886%>" Value="%%Fax%%" />
                                <asp:ListItem Text="<%$ Resources:Content, GN00001132%>" Value="%%FirstName%%" />
                                <asp:ListItem Text="<%$ Resources:Content, DGN1110382%>" Value="%%HomePhone%%" />
                                <%--<asp:ListItem Text="<%$ Resources:Content, FAM0057%>" Value="%%Identity%%" />--%>
                                <asp:ListItem Text="<%$ Resources:Content, DGN1110336%>" Value="%%Initials%%" />
                                <asp:ListItem Text="<%$ Resources:Content, GN00001133%>" Value="%%LastName%%" />
                                <%--<asp:ListItem Text="<%$ Resources:Content, DGN1110360%>" Value="%%Manager%%" />--%>
                                <asp:ListItem Text="<%$ Resources:Content, GN0000885%>" Value="%%MobilePhone%%" />
                                <asp:ListItem Text="<%$ Resources:Content, GN00001336%>" Value="%%Notes%%" />

                                <%--<asp:ListItem Text="<%$ Resources:Content, GN000170%>" Value="%%Name%%" />--%>
                                <asp:ListItem Text="<%$ Resources:Content, DGN1110359%>" Value="%%Office%%" />
                                <asp:ListItem Text="<%$ Resources:Content, DGN1110383%>" Value="%%Pager%%" />
                                <asp:ListItem Text="<%$ Resources:Content, GN00012%>" Value="%%Phone%%" />
                                <asp:ListItem Text="<%$ Resources:Content, GN00001522%>" Value="%%PostalCode%%" />
                                <asp:ListItem Text="<%$ Resources:Content, FAM0059%>" Value="%%PostOfficeBox%%" />
                                <%--<asp:ListItem Text="<%$ Resources:Content, FAM0060%>" Value="%%SamAccountName%%" />--%>
                                <asp:ListItem Text="<%$ Resources:Content, GN00001313%>" Value="%%StateOrProvince%%" />
                                <asp:ListItem Text="<%$ Resources:Content, DGN1110530%>" Value="%%StreetAddress%%" />
                                <asp:ListItem Text="<%$ Resources:Content, GN0000280%>" Value="%%Title%%" />
                                <asp:ListItem Text="<%$ Resources:Content, String336%>" Value="%%UserPrincipalName%%" />

                                <%--<asp:ListItem Text="<%$ Resources:Content, GN0001120%>" Value="%%WebPage%%" />--%>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="col-sm-5 col-xs-12">
                        <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content, FAM0061%>" EnableViewState="false" Visible="false" />
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:Content,strPrependTheSubject%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_PrependTheSubject" runat="server" />
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:Content, strExceptIfTheSenderDomain%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <asp:TextBox ID="TxBx_ExceptIfTheSenderDomain" TextMode="MultiLine" Height="150px" Width="100%" runat="server"></asp:TextBox>
                    </div>
                    <div class="col-sm-5 col-xs-12 row-label">
                        <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:Content, strCommaSepDomainNames%>" EnableViewState="false" />
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal14" runat="server" Text="<%$ Resources:Content, strExceptIfTheRecipientDomain%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <asp:TextBox ID="TxBx_ExceptIfTheRecipientDomain" TextMode="MultiLine" Height="150px" Width="100%" runat="server"></asp:TextBox>
                    </div>
                    <div class="col-sm-5 col-xs-12 row-label">
                        <asp:Literal ID="Literal15" runat="server" Text="<%$ Resources:Content, strCommaSepDomainNames%>" EnableViewState="false" />
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content, Exch09090%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <asp:TextBox ID="TxBx_ExceptText" TextMode="MultiLine" Height="150px" Width="100%" runat="server" MaxLength="128"></asp:TextBox>
                    </div>
                    <div class="col-sm-5 col-xs-12 row-label">
                        <asp:Literal ID="Ltl_Note" runat="server" Text="<%$ Resources:Content, FAM00124%>" EnableViewState="false" />
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:Content, ExceptIfSenderIsMemberOf%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <asp:TextBox ID="Txbx_ExceptIfSenderIsMemberOf" TextMode="MultiLine" Height="150px" Width="100%" runat="server" MaxLength="128"></asp:TextBox>
                    </div>
                    <div class="col-sm-5 col-xs-12 row-label">
                        <asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:Content, FAM00254%>" EnableViewState="false" />
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal12" runat="server" Text="<%$ Resources:Content, ExceptIfRecipientIsMemberOf%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <asp:TextBox ID="TxBx_ExceptIfRecipientIsMemberOf" TextMode="MultiLine" Height="150px" Width="100%" runat="server" MaxLength="128"></asp:TextBox>
                    </div>
                    <div class="col-sm-5 col-xs-12 row-label">
                        <asp:Literal ID="Literal13" runat="server" Text="<%$ Resources:Content, FAM00254%>" EnableViewState="false" />
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content, FAM00253%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <asp:TextBox ID="TxBx_ExceptEmails" TextMode="MultiLine" Width="100%" Height="150px" runat="server"></asp:TextBox>
                    </div>
                    <div class="col-sm-5 col-xs-12 row-label">
                        <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:Content, FAM00254%>" EnableViewState="false" />
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <asp:ValidationSummary ID="VS" runat="server" ShowMessageBox="true" ShowSummary="false"
                            ValidationGroup="Disclaimer" HeaderText="<%$ Resources:Content,EM000001%>" />
                        <asp:Button ID="Btn_Save" runat="server" ValidationGroup="Disclaimer" Text="<%$ Resources:Content,GN0000281%>"
                            class="btn btn-primary waves-effect btnAction" />
                        <asp:Button ID="Btn_Cancel" runat="server" Text="<%$ Resources:Content,GN0000572%>" class="btn btn-primary waves-effect"
                            CausesValidation="false" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
