<%@ control language="VB" autoeventwireup="false" inherits="RCC_Exchange_CC_TransportRules, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility"
    TagPrefix="CC" %>


<div class="row">
    <div class="col-xs-12">
        <div class="alert alert-info d-flex flex-row" role="alert">
            <%--<i class="material-icons">info</i>--%>
            <asp:Literal ID="Literal5" runat="server" EnableViewState="false" Text="<%$ Resources:Content,TransportRulesNotice %>" />
        </div>
    </div>

    <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_AddTransportRule" runat="server" class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,AddTransportRule%>"
                            CausesValidation="false" />
                    </div>
                </div>
            </div>
        </div>

        <br />
        <div class="card">
            <div class="body">
                <div class="row">
                    <div class="col-sm-7 col-xs-12">
                        <asp:GridView ID="GV_Rule" 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,DGN1110008%>" HeaderStyle-CssClass="col-xs-8" ItemStyle-CssClass="col-xs-8">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="Lbl_RuleName" runat="server" CommandName="RuleDetails" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="<%$ Resources:Content,SMI0423%>" HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                                    <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 class="col-sm-5 col-xs-12">
                        <div class="card" id="Div_DescriptionCard" runat="server">
                            <div class="header">
                                <h3><%= Resources.Content.TransportRuleDetail%></h3>
                            </div>
                            <div class="body">
                                <div class="row">
                                    <div class="col-xs-12" id="Div_Description" runat="server">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </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,AddTransportRule %>" />
                </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,DGN1110008%>"
                                EnableViewState="false" />:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_RuleName" runat="server" MaxLength="50" />
                            </div>
                        </div>
                        <asp:RequiredFieldValidator ControlToValidate="TxBx_RuleName" ID="RFV_TxBx_RuleName" runat="server"
                            Display="None" ValidationGroup="TransportRule"></asp:RequiredFieldValidator>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        *
                        <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content,ApplyThisRuleIf%>" />:
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="DDL_ParentCondition" runat="server" AutoPostBack="true">
                                <asp:ListItem Text="Please select condition" Value="-1"></asp:ListItem>
                                <asp:ListItem Text="The sender ..." Value="thesender"></asp:ListItem>
                                <asp:ListItem Text="The recipient ..." Value="therecipient"></asp:ListItem>
                                <asp:ListItem Text="The subject or body ..." Value="thesubjectorbody"></asp:ListItem>
                                <asp:ListItem Text="Any attachment ..." Value="anyattachment"></asp:ListItem>
                                <asp:ListItem Text="Any recipient ..." Value="anyrecipient"></asp:ListItem>
                                <asp:ListItem Text="The message ..." Value="themessage"></asp:ListItem>
                                <asp:ListItem Text="The sender and the recipient ..." Value="thesenderandtherecipient"></asp:ListItem>
                                <asp:ListItem Text="The message properties ..." Value="themessageproperties"></asp:ListItem>
                                <asp:ListItem Text="A message header ..." Value="amessageheader"></asp:ListItem>
                                <asp:ListItem Text="[Apply to all messages]" Value="applytoallmessages"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="col-sm-5 col-xs-12">
                        <div class="form-group" id="Div_DDL_SubCondition" runat="server" visible="false">
                            <asp:DropDownList ID="DDL_SubCondition" runat="server" AutoPostBack="true">
                            </asp:DropDownList>
                        </div>
                    </div>
                </div>

                <div class="row" id="Div_Conditions" runat="server" visible="false">
                    <div class="col-xs-12">
                        <asp:Repeater ID="Rep_Conditions" runat="server">
                            <ItemTemplate>
                                <div class="row">
                                    <div class="col-sm-1 col-xs-12">
                                        <asp:ImageButton ID="IB_Remove" runat="server" ImageUrl="~/App_Themes/Default/Images/icons/disabled-icon.png"
                                            CommandName="Remove" AlternateText="<%$ Resources:Content,GN000150%>" />
                                        &nbsp;
                                        <asp:Literal ID="Ltl_AND" runat="server" Text="AND" />
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <asp:Literal ID="Lbl_Conditions" runat="server" />
                                    </div>

                                    <div class="col-sm-7 col-xs-12">
                                        <asp:LinkButton ID="Btn_SelectValue" runat="server" Text="Select Value" CommandName="SelectValue" CausesValidation="false"
                                            CommandArgument='<%# Container.ItemIndex %>' />
                                    </div>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="col-xs-12">
                        <hr />
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        *
                        <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,DoTheFollowing%>" />:
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="DDL_ParentAction" runat="server" AutoPostBack="true">
                                <asp:ListItem Text="Please select action" Value="-1"></asp:ListItem>
                                <asp:ListItem Text="Forward the message for approval ..." Value="forwardthemessageforapproval"></asp:ListItem>
                                <asp:ListItem Text="Redirect the message to ..." Value="redirectthemessageto"></asp:ListItem>
                                <asp:ListItem Text="Block the message ..." Value="blockthemessage"></asp:ListItem>
                                <asp:ListItem Text="Add recipients ..." Value="addrecipients"></asp:ListItem>
                                <asp:ListItem Text="Apply a disclaimer to the message ..." Value="applyadisclaimertothemessage"></asp:ListItem>
                                <asp:ListItem Text="Modify the message properties ..." Value="modifythemessageproperties"></asp:ListItem>
                                <asp:ListItem Text="Modify the message security ..." Value="modifythemessagesecurity"></asp:ListItem>
                                <asp:ListItem Text="Prepand the subject of the message with ..." Value="prepandthesubjectofthemessagewith"></asp:ListItem>
                                <asp:ListItem Text="Notify the sender with a policy tip ..." Value="notifythesenderwithapolicytip"></asp:ListItem>
                                <asp:ListItem Text="Generate incident report and send it to ..." Value="generateincidentreportandsenditto"></asp:ListItem>
                                <asp:ListItem Text="Notify the recipient with a message ..." Value="notifytherecipientwithamessage"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="col-sm-5 col-xs-12">
                        <div class="form-group" id="Div_DDL_SubAction" runat="server" visible="false">
                            <asp:DropDownList ID="DDL_SubAction" runat="server" AutoPostBack="true">
                            </asp:DropDownList>
                        </div>
                    </div>
                </div>

                <div class="row" id="Div_Actions" runat="server" visible="false">
                    <div class="col-xs-12">
                        <asp:Repeater ID="Rep_Actions" runat="server">
                            <ItemTemplate>
                                <div class="row">
                                    <div class="col-sm-1 col-xs-12">
                                        <asp:ImageButton ID="IB_Remove" runat="server" ImageUrl="~/App_Themes/Default/Images/icons/disabled-icon.png"
                                            CommandName="Remove" AlternateText="<%$ Resources:Content,GN000150%>" />
                                        &nbsp;
                                        <asp:Literal ID="Ltl_AND" runat="server" Text="AND" />
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <asp:Literal ID="Lbl_Actions" runat="server" />
                                    </div>

                                    <div class="col-sm-7 col-xs-12">
                                        <asp:LinkButton ID="Btn_SelectValue" runat="server" Text="Select Value" CommandName="SelectValue" CausesValidation="false"
                                            CommandArgument='<%# Container.ItemIndex %>' />
                                    </div>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="col-xs-12">
                        <hr />
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,ExceptIf%>" />:
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="DDL_ParentException" runat="server" AutoPostBack="true">
                                <asp:ListItem Text="Please select Exception" Value="-1"></asp:ListItem>
                                <asp:ListItem Text="The sender ..." Value="thesender"></asp:ListItem>
                                <asp:ListItem Text="The recipient ..." Value="therecipient"></asp:ListItem>
                                <asp:ListItem Text="The subject or body ..." Value="thesubjectorbody"></asp:ListItem>
                                <asp:ListItem Text="Any attachment ..." Value="anyattachment"></asp:ListItem>
                                <asp:ListItem Text="Any recipient ..." Value="anyrecipient"></asp:ListItem>
                                <asp:ListItem Text="The message ..." Value="themessage"></asp:ListItem>
                                <asp:ListItem Text="The sender and the recipient ..." Value="thesenderandtherecipient"></asp:ListItem>
                                <asp:ListItem Text="The message properties ..." Value="themessageproperties"></asp:ListItem>
                                <asp:ListItem Text="A message header ..." Value="amessageheader"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="col-sm-5 col-xs-12">
                        <div class="form-group" id="Div_DDL_SubException" runat="server" visible="false">
                            <asp:DropDownList ID="DDL_SubException" runat="server" AutoPostBack="true">
                            </asp:DropDownList>
                        </div>
                    </div>
                </div>

                <div class="row" id="Div_Exceptions" runat="server" visible="false">
                    <div class="col-xs-12">
                        <asp:Repeater ID="Rep_Exceptions" runat="server">
                            <ItemTemplate>
                                <div class="row">
                                    <div class="col-sm-1 col-xs-12">
                                        <asp:ImageButton ID="IB_Remove" runat="server" ImageUrl="~/App_Themes/Default/Images/icons/disabled-icon.png"
                                            CommandName="Remove" AlternateText="<%$ Resources:Content,GN000150%>" />
                                        &nbsp;
                                        <asp:Literal ID="Ltl_AND" runat="server" Text="OR" />
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <asp:Literal ID="Lbl_Exceptions" runat="server" />
                                    </div>

                                    <div class="col-sm-7 col-xs-12">
                                        <asp:LinkButton ID="Btn_SelectValue" runat="server" Text="Select Value" CommandName="SelectValue" CausesValidation="false"
                                            CommandArgument='<%# Container.ItemIndex %>' />
                                    </div>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="col-xs-12">
                        <hr />
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <div class="card">
                            <div class="header">
                                <h3>
                                    <asp:Literal ID="Literal4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,PropertiesOfThisRule %>" />:
                                </h3>
                            </div>
                            <div class="body">
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <div class="form-group">
                                            <asp:CheckBox ID="ChBx_AuditRuleWithSeverityLevel" runat="server" Text="<%$ Resources:Content,AuditRuleWithSeverityLevel%>" />
                                        </div>
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <asp:DropDownList ID="DDL_AuditRuleWithSeverityLevel" runat="server" Enabled="false">
                                                <asp:ListItem Text="Not Specified" Value="DoNotAudit"></asp:ListItem>
                                                <asp:ListItem Text="Low" Value="Low"></asp:ListItem>
                                                <asp:ListItem Text="Medium" Value="Medium"></asp:ListItem>
                                                <asp:ListItem Text="High" Value="High"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                </div>
                                <%--<div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <label>
                                            <asp:Literal ID="Literal13" runat="server" Text="<%$ Resources:Content,SelectPriority%>"
                                                EnableViewState="false" />:</label>
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <asp:DropDownList ID="DDL_Priority" runat="server">
                                                <asp:ListItem Text="0" Value="0"></asp:ListItem>
                                                <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                                <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                                <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                                <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                                <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                                <asp:ListItem Text="6" Value="6"></asp:ListItem>
                                                <asp:ListItem Text="7" Value="7"></asp:ListItem>
                                                <asp:ListItem Text="8" Value="8"></asp:ListItem>
                                                <asp:ListItem Text="9" Value="9"></asp:ListItem>
                                                <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                <asp:ListItem Text="11" Value="11"></asp:ListItem>
                                                <asp:ListItem Text="12" Value="12"></asp:ListItem>
                                                <asp:ListItem Text="13" Value="13"></asp:ListItem>
                                                <asp:ListItem Text="14" Value="14"></asp:ListItem>
                                                <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                                <asp:ListItem Text="16" Value="16"></asp:ListItem>
                                                <asp:ListItem Text="17" Value="17"></asp:ListItem>
                                                <asp:ListItem Text="18" Value="18"></asp:ListItem>
                                                <asp:ListItem Text="19" Value="19"></asp:ListItem>
                                                <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                                <asp:ListItem Text="21" Value="21"></asp:ListItem>
                                                <asp:ListItem Text="22" Value="22"></asp:ListItem>
                                            </asp:DropDownList>
                                        </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,ChooseModeForThisRule%>"
                                                EnableViewState="false" />:</label>
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <asp:RadioButtonList ID="RBL_ChooseModeForThisRule" runat="server">
                                                <asp:ListItem Text="Enforce" Value="Enforce"></asp:ListItem>
                                                <asp:ListItem Text="Test with Policy Tips" Value="AuditAndNotify"></asp:ListItem>
                                                <asp:ListItem Text="Test without Policy Tips" Value="Audit"></asp:ListItem>
                                            </asp:RadioButtonList>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <div class="form-group">
                                            <asp:CheckBox ID="ChBx_ActivateRuleOnFollowingDate" runat="server" Text="<%$ Resources:Content,ActivateRuleOnFollowingDate%>" />
                                        </div>
                                    </div>
                                    <div class="col-sm-2 col-xs-12">
                                        <div class="form-group display-date-input">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_ActivateRuleOnFollowingDate" runat="server" Enabled="false" />
                                            </div>
                                        </div>

                                        <i runat="server" id="A_ActivateRuleOnFollowingDate" class="material-icons icon-calendar col-calendar"></i>
                                        <EM:CalendarExtender ID="CE_ActivateRuleOnFollowingDate" runat="server" TargetControlID="TxBx_ActivateRuleOnFollowingDate"
                                            Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>" PopupButtonID="A_ActivateRuleOnFollowingDate" CssClass="date__calendar">
                                        </EM:CalendarExtender>
                                    </div>
                                    <div class="col-sm-2 col-xs-12">
                                        <div class="form-group">
                                            <asp:DropDownList ID="DDL_ActivateRuleOnFollowingDate" runat="server" Enabled="false">
                                                <asp:ListItem Text="12:00 AM" Value="0"></asp:ListItem>
                                                <asp:ListItem Text="12:30 AM" Value="30"></asp:ListItem>
                                                <asp:ListItem Text="1:00 AM" Value="60"></asp:ListItem>
                                                <asp:ListItem Text="1:30 AM" Value="90"></asp:ListItem>
                                                <asp:ListItem Text="2:00 AM" Value="120"></asp:ListItem>
                                                <asp:ListItem Text="2:30 AM" Value="150"></asp:ListItem>
                                                <asp:ListItem Text="3:00 AM" Value="180"></asp:ListItem>
                                                <asp:ListItem Text="3:30 AM" Value="210"></asp:ListItem>
                                                <asp:ListItem Text="4:00 AM" Value="240"></asp:ListItem>
                                                <asp:ListItem Text="4:30 AM" Value="270"></asp:ListItem>
                                                <asp:ListItem Text="5:00 AM" Value="300"></asp:ListItem>
                                                <asp:ListItem Text="5:30 AM" Value="330"></asp:ListItem>
                                                <asp:ListItem Text="6:00 AM" Value="360"></asp:ListItem>
                                                <asp:ListItem Text="6:30 AM" Value="390"></asp:ListItem>
                                                <asp:ListItem Text="7:00 AM" Value="420"></asp:ListItem>
                                                <asp:ListItem Text="7:30 AM" Value="450"></asp:ListItem>
                                                <asp:ListItem Text="8:00 AM" Value="480"></asp:ListItem>
                                                <asp:ListItem Text="8:30 AM" Value="510"></asp:ListItem>
                                                <asp:ListItem Text="9:00 AM" Value="540"></asp:ListItem>
                                                <asp:ListItem Text="9:30 AM" Value="570"></asp:ListItem>
                                                <asp:ListItem Text="10:00 AM" Value="600"></asp:ListItem>
                                                <asp:ListItem Text="10:30 AM" Value="630"></asp:ListItem>
                                                <asp:ListItem Text="11:00 AM" Value="660"></asp:ListItem>
                                                <asp:ListItem Text="11:30 AM" Value="690"></asp:ListItem>
                                                <asp:ListItem Text="12:00 PM" Value="720"></asp:ListItem>
                                                <asp:ListItem Text="12:30 PM" Value="750"></asp:ListItem>
                                                <asp:ListItem Text="1:00 PM" Value="780"></asp:ListItem>
                                                <asp:ListItem Text="1:30 PM" Value="810"></asp:ListItem>
                                                <asp:ListItem Text="2:00 PM" Value="840"></asp:ListItem>
                                                <asp:ListItem Text="2:30 PM" Value="870"></asp:ListItem>
                                                <asp:ListItem Text="3:00 PM" Value="900"></asp:ListItem>
                                                <asp:ListItem Text="3:30 PM" Value="930"></asp:ListItem>
                                                <asp:ListItem Text="4:00 PM" Value="960"></asp:ListItem>
                                                <asp:ListItem Text="4:30 PM" Value="990"></asp:ListItem>
                                                <asp:ListItem Text="5:00 PM" Value="1020"></asp:ListItem>
                                                <asp:ListItem Text="5:30 PM" Value="1050"></asp:ListItem>
                                                <asp:ListItem Text="6:00 PM" Value="1080"></asp:ListItem>
                                                <asp:ListItem Text="6:30 PM" Value="1110"></asp:ListItem>
                                                <asp:ListItem Text="7:00 PM" Value="1140"></asp:ListItem>
                                                <asp:ListItem Text="7:30 PM" Value="1170"></asp:ListItem>
                                                <asp:ListItem Text="8:00 PM" Value="1200"></asp:ListItem>
                                                <asp:ListItem Text="8:30 PM" Value="1230"></asp:ListItem>
                                                <asp:ListItem Text="9:00 PM" Value="1260"></asp:ListItem>
                                                <asp:ListItem Text="9:30 PM" Value="1290"></asp:ListItem>
                                                <asp:ListItem Text="10:00 PM" Value="1320"></asp:ListItem>
                                                <asp:ListItem Text="10:30 PM" Value="1350"></asp:ListItem>
                                                <asp:ListItem Text="11:00 PM" Value="1380"></asp:ListItem>
                                                <asp:ListItem Text="11:30 PM" Value="1410"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <div class="form-group">
                                            <asp:CheckBox ID="ChBx_DeActivateRuleOnFollowingDate" runat="server" Text="<%$ Resources:Content,DeActivateRuleOnFollowingDate%>" />
                                        </div>
                                    </div>
                                    <div class="col-sm-2 col-xs-12">
                                        <div class="form-group display-date-input">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_DeActivateRuleOnFollowingDate" runat="server" Enabled="false" />
                                            </div>
                                        </div>

                                        <i runat="server" id="A_DeActivateRuleOnFollowingDate" class="material-icons icon-calendar col-calendar"></i>
                                        <EM:CalendarExtender ID="CE_DeActivateRuleOnFollowingDate" runat="server" TargetControlID="TxBx_DeActivateRuleOnFollowingDate"
                                            Format="<%# System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern %>" PopupButtonID="A_DeActivateRuleOnFollowingDate" CssClass="date__calendar">
                                        </EM:CalendarExtender>
                                    </div>
                                    <div class="col-sm-2 col-xs-12">
                                        <div class="form-group">
                                            <asp:DropDownList ID="DDL_DeActivateRuleOnFollowingDate" runat="server" Enabled="false">
                                                <asp:ListItem Text="12:00 AM" Value="0"></asp:ListItem>
                                                <asp:ListItem Text="12:30 AM" Value="30"></asp:ListItem>
                                                <asp:ListItem Text="1:00 AM" Value="60"></asp:ListItem>
                                                <asp:ListItem Text="1:30 AM" Value="90"></asp:ListItem>
                                                <asp:ListItem Text="2:00 AM" Value="120"></asp:ListItem>
                                                <asp:ListItem Text="2:30 AM" Value="150"></asp:ListItem>
                                                <asp:ListItem Text="3:00 AM" Value="180"></asp:ListItem>
                                                <asp:ListItem Text="3:30 AM" Value="210"></asp:ListItem>
                                                <asp:ListItem Text="4:00 AM" Value="240"></asp:ListItem>
                                                <asp:ListItem Text="4:30 AM" Value="270"></asp:ListItem>
                                                <asp:ListItem Text="5:00 AM" Value="300"></asp:ListItem>
                                                <asp:ListItem Text="5:30 AM" Value="330"></asp:ListItem>
                                                <asp:ListItem Text="6:00 AM" Value="360"></asp:ListItem>
                                                <asp:ListItem Text="6:30 AM" Value="390"></asp:ListItem>
                                                <asp:ListItem Text="7:00 AM" Value="420"></asp:ListItem>
                                                <asp:ListItem Text="7:30 AM" Value="450"></asp:ListItem>
                                                <asp:ListItem Text="8:00 AM" Value="480"></asp:ListItem>
                                                <asp:ListItem Text="8:30 AM" Value="510"></asp:ListItem>
                                                <asp:ListItem Text="9:00 AM" Value="540"></asp:ListItem>
                                                <asp:ListItem Text="9:30 AM" Value="570"></asp:ListItem>
                                                <asp:ListItem Text="10:00 AM" Value="600"></asp:ListItem>
                                                <asp:ListItem Text="10:30 AM" Value="630"></asp:ListItem>
                                                <asp:ListItem Text="11:00 AM" Value="660"></asp:ListItem>
                                                <asp:ListItem Text="11:30 AM" Value="690"></asp:ListItem>
                                                <asp:ListItem Text="12:00 PM" Value="720"></asp:ListItem>
                                                <asp:ListItem Text="12:30 PM" Value="750"></asp:ListItem>
                                                <asp:ListItem Text="1:00 PM" Value="780"></asp:ListItem>
                                                <asp:ListItem Text="1:30 PM" Value="810"></asp:ListItem>
                                                <asp:ListItem Text="2:00 PM" Value="840"></asp:ListItem>
                                                <asp:ListItem Text="2:30 PM" Value="870"></asp:ListItem>
                                                <asp:ListItem Text="3:00 PM" Value="900"></asp:ListItem>
                                                <asp:ListItem Text="3:30 PM" Value="930"></asp:ListItem>
                                                <asp:ListItem Text="4:00 PM" Value="960"></asp:ListItem>
                                                <asp:ListItem Text="4:30 PM" Value="990"></asp:ListItem>
                                                <asp:ListItem Text="5:00 PM" Value="1020"></asp:ListItem>
                                                <asp:ListItem Text="5:30 PM" Value="1050"></asp:ListItem>
                                                <asp:ListItem Text="6:00 PM" Value="1080"></asp:ListItem>
                                                <asp:ListItem Text="6:30 PM" Value="1110"></asp:ListItem>
                                                <asp:ListItem Text="7:00 PM" Value="1140"></asp:ListItem>
                                                <asp:ListItem Text="7:30 PM" Value="1170"></asp:ListItem>
                                                <asp:ListItem Text="8:00 PM" Value="1200"></asp:ListItem>
                                                <asp:ListItem Text="8:30 PM" Value="1230"></asp:ListItem>
                                                <asp:ListItem Text="9:00 PM" Value="1260"></asp:ListItem>
                                                <asp:ListItem Text="9:30 PM" Value="1290"></asp:ListItem>
                                                <asp:ListItem Text="10:00 PM" Value="1320"></asp:ListItem>
                                                <asp:ListItem Text="10:30 PM" Value="1350"></asp:ListItem>
                                                <asp:ListItem Text="11:00 PM" Value="1380"></asp:ListItem>
                                                <asp:ListItem Text="11:30 PM" Value="1410"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </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,StopProcessingMoreRules%>"
                                                EnableViewState="false" />:</label>
                                    </div>
                                    <div class="col-sm-1 col-xs-12">
                                        <div class="form-group">
                                            <asp:CheckBox ID="ChBx_StopProcessingMoreRules" runat="server" Text=" " />
                                        </div>
                                    </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,DeferMessageIfRuleProcessingNotComplete%>"
                                                EnableViewState="false" />:</label>
                                    </div>
                                    <div class="col-sm-1 col-xs-12">
                                        <div class="form-group">
                                            <asp:CheckBox ID="ChBx_DeferMessageIfRuleProcessingNotComplete" runat="server" Text=" " />
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <label>
                                            <asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:Content,MatchSenderAaddressInMessage%>"
                                                EnableViewState="false" />:</label>
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <asp:DropDownList ID="DDL_MatchSenderAaddressInMessage" runat="server">
                                                <asp:ListItem Text="Header" Value="Header"></asp:ListItem>
                                                <asp:ListItem Text="Envelope" Value="Envelope"></asp:ListItem>
                                                <asp:ListItem Text="Header or envelope" Value="HeaderOrEnvelope"></asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </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,GN000148%>"
                                                EnableViewState="false" />:</label>
                                    </div>
                                    <div class="col-sm-9 col-xs-12">
                                        <div class="form-group">
                                            <asp:TextBox ID="TXBx_Comments" runat="server" TextMode="MultiLine" Rows="10">
                                            </asp:TextBox>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <asp:ValidationSummary ID="VS" runat="server" ShowMessageBox="true" ShowSummary="false"
                            ValidationGroup="TransportRule" HeaderText="<%$ Resources:Content,EM000001%>" />
                        <asp:Button ID="Btn_Save" runat="server" ValidationGroup="TransportRule" 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>

    <asp:Button ID="Btn_RDisplay" runat="server" Style="display: none;" />
    <asp:Button ID="Btn_RDone" runat="server" Style="display: none;" />
    <asp:Panel ID="Pnl_RulePopUp" runat="server" CssClass="width-modal-popup-auto" Style="display: none; min-height: 250px;">
        <div class="col-xs-12">
            <div class="card">
                <div class="header">
                    <h3>
                        <asp:Literal ID="Ltrl_SelectValueHeader" runat="server" Text="" />
                    </h3>
                </div>
                <div class="body">
                    <div class="row" id="Div_PopupError" runat="server" visible="false">
                        <div class="col-xs-12">
                            <asp:Label ID="Lbl_PopupError" runat="server" ForeColor="red" Font-Bold="true"></asp:Label>
                        </div>
                    </div>

                    <div class="row" id="Div_Label" runat="server" visible="false">
                        <div class="col-xs-12">
                            <asp:Label ID="Lbl_SelectValue" runat="server"></asp:Label>
                        </div>
                    </div>

                    <div class="row" id="Div_Textarea" runat="server" visible="false">
                        <div class="col-xs-12">
                            <asp:TextBox ID="TA_SelectValue" runat="server" TextMode="MultiLine" Height="250px"></asp:TextBox>
                        </div>
                        <div class="col-xs-12">
                            <b>Note:</b>
                            Input a paragraph or input multiple words or phrases or ip addresses or domain names separated with semi colon (;) without space, given space will be added into filter. 
                            <br />
                            <b>For example:</b> This is phrase1; This is phrase2;Word1;Word2;1.1.1.1;192.168.1.1-192.168.1.200;5.5.5.5
                            <br />
                            <b>Filter Display:</b> "This is phrase1" or " This is phrase2" or "Word1" or "Word2"
                        </div>
                    </div>

                    <div class="row" id="Div_TextBox" runat="server" visible="false">
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Lbl_InputLabel" runat="server" Text="<%$ Resources:Content,SpecifySizeKB %>"></asp:Label>:
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="Txt_SelectValue" runat="server"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row" id="Div_DDL" runat="server" visible="false">
                        <div class="col-xs-12">
                            <div class="form-group">
                                <asp:DropDownList ID="DDL_SelectValue" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>

                    <div class="row" id="Div_TwoDDLs" runat="server" visible="false">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Label ID="Lbl_TwoDDLsStart" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="form-group">
                                <asp:DropDownList ID="DDL_SelectValueTwoDDLsOne" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Label ID="Lbl_TwoDDLsMid" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="form-group">
                                <asp:DropDownList ID="DDL_SelectValueTwoDDLsTwo" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Label ID="Lbl_TwoDDLsEnd" runat="server" Text=""></asp:Label>
                        </div>
                    </div>

                    <div class="row" id="Div_TwoTXTs" runat="server" visible="false">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Label ID="Lbl_TwoTXTsStart" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_SelectValueTwoTXTsOne" runat="server">
                                    </asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Label ID="Lbl_TwoTXTsMid" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_SelectValueTwoTXTsTwo" runat="server">
                                    </asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Label ID="Lbl_TwoTXTsEnd" runat="server" Text=""></asp:Label>
                        </div>
                    </div>

                    <div class="row" id="Div_DDLAndMultiSelect" runat="server" visible="false">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Label ID="Lbl_DDLAndMultiSelectStart" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <asp:DropDownList ID="DDL_SelectValueDDLAndMultiSelect" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Lbl_DDLAndMultiSelectMid" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-xs-12">
                            <ajax:UpdatePanel ID="UP_MailboxesGroupsDDLAndMultiSelect" runat="server">
                                <ContentTemplate>
                                    <EM:AddSelectableSelected ID="UCMailboxesGroupsDDLAndMultiSelect" runat="server" />
                                </ContentTemplate>
                            </ajax:UpdatePanel>
                        </div>
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Lbl_DDLAndMultiSelectEnd" runat="server" Text=""></asp:Label>
                        </div>
                    </div>

                    <div class="row" id="Div_MultiSelect" runat="server" visible="false">
                        <div class="col-xs-12">
                            <ajax:UpdatePanel ID="UP_MailboxesGroups" runat="server">
                                <ContentTemplate>
                                    <EM:AddSelectableSelected ID="UCMailboxesGroups" runat="server" />
                                </ContentTemplate>
                            </ajax:UpdatePanel>
                        </div>
                    </div>

                    <div class="row" id="Div_TwoMultiSelects" runat="server" visible="false">
                        <div class="col-xs-12">
                            <ajax:UpdatePanel ID="UP_MailboxesGroupsOne" runat="server">
                                <ContentTemplate>
                                    <EM:AddSelectableSelected ID="UCMailboxesGroupsOne" runat="server" />
                                </ContentTemplate>
                            </ajax:UpdatePanel>
                        </div>
                        <div class="col-xs-12">
                            AND
                        </div>
                        <div class="col-xs-12">
                            <ajax:UpdatePanel ID="UP_MailboxesGroupsTwo" runat="server">
                                <ContentTemplate>
                                    <EM:AddSelectableSelected ID="UCMailboxesGroupsTwo" runat="server" />
                                </ContentTemplate>
                            </ajax:UpdatePanel>
                        </div>
                    </div>

                    <div class="row" id="Div_TextAreaAndDDL" runat="server" visible="false">
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Lbl_TextAreaAndDDLStart" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-xs-12">
                            <asp:TextBox ID="TA_SelectValueTextAreaAndDDL" runat="server" TextMode="MultiLine" Height="250px"></asp:TextBox>
                        </div>
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Lbl_TextAreaAndDDLMid" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <asp:DropDownList ID="DDL_SelectValueTextAreaAndDDL" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Lbl_TextAreaAndDDLEnd" runat="server" Text=""></asp:Label>
                        </div>
                    </div>

                    <div class="row" id="Div_DDLAndTXT" runat="server" visible="false">
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Lbl_DDLAndTXTStart" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <asp:DropDownList ID="DDL_SelectValueDDLAndTXT" runat="server">
                                </asp:DropDownList>
                            </div>
                        </div>
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Lbl_DDLAndTXTMid" runat="server" Text=""></asp:Label>
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_SelectValueDDLAndTXT" runat="server">
                                    </asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Lbl_DDLAndTXTEnd" runat="server" Text=""></asp:Label>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-xs-12">
                            <asp:Button ID="Btn_SaveConditions" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN0000281%>'
                                Visible="false" />
                            <asp:Button ID="Btn_SaveActions" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN0000281%>'
                                Visible="false" />
                            <asp:Button ID="Btn_SaveExceptions" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN0000281%>'
                                Visible="false" />
                            <asp:Button ID="Btn_CloseRuleValue" CausesValidation="false" runat="server" Text='<%$ Resources:Content,GN000150 %>'
                                class="btn btn-primary waves-effect" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </asp:Panel>
    <EM:ModalPopupExtender runat="server" ID="MPE_RulePopUp" BackgroundCssClass="modalBackground"
        DropShadow="false" PopupControlID="Pnl_RulePopUp" TargetControlID="Btn_RDisplay"
        OkControlID="Btn_RDone">
    </EM:ModalPopupExtender>

</div>
