<%@ control language="VB" autoeventwireup="false" inherits="RCC_Exchange_CC_Journaling, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility" TagPrefix="EM" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>

<div id="Pnl_Listing" runat="server">
    <div class="row">
        <div class="col-xs-12">
            <div class="card Div_OpsRow" id="Div_OpsRow" runat="server">
                <div class="header">
                    <h3>
                        <%= Resources.Content.GN00001320%>      <%--Operations--%>
                    </h3>
                </div>
                <div class="body">
                    <div class="row">
                        <div class="col-xs-12">
                            <asp:Button ID="Btn_EnableJournaling" runat="server" CssClass="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,EnableJournaling%>' />
                            <asp:Button ID="Btn_UpdateJournaling" runat="server" CssClass="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,UpdateJournaling%>' />
                            <asp:Button ID="Btn_DisableJournaling" runat="server" CssClass="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,strDisableJournaling%>'
                                Custom1="Custom" Style="display: none" />
                            <asp:Button ID="Btn_ExportJournaling" runat="server" CssClass="btn btn-primary waves-effect" Text='<%$ Resources:Content,ExportJournaling%>' />
                        </div>
                    </div>
                </div>
            </div>
            <br />
            <asp:UpdatePanel ID="UP_UpdateDLMembersCSV" runat="server" ChildrenAsTriggers="true">
                <ContentTemplate>
                    <div class="card">
                        <div class="header">
                            <h3>
                                <%= Resources.Content.ImportExportedFileJournaling%>      <%--Operations--%>
                            </h3>
                        </div>

                        <div class="body">
                            <div class="row">
                                <div class="col-sm-3 col-xs-12 row-label">
                                    <label>
                                        <asp:Literal ID="Ltrl_UploadCSVBulk" runat="server" Text="<%$Resources:Content,selectExcelFileToImport %>"></asp:Literal>:</label>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <div class="fileupload fileupload-new" data-provides="fileupload">
                                            <span class="btn btn-primary btn-file"><span class="fileupload-new"><%= Resources.Content.strSelectFile%></span>
                                                <span class="fileupload-exists"><%= Resources.Content.GN0000385%></span>
                                                <asp:FileUpload ID="FU_BulkImport" runat="server" />
                                            </span>
                                            <span class="fileupload-preview"></span>
                                            <a href="#" class="close fileupload-exists" data-dismiss="fileupload" style="float: none">×</a>
                                            <asp:RequiredFieldValidator ID="RFV_FU_BulkImport" runat="server" ControlToValidate="FU_BulkImport"
                                                Display="None" SetFocusOnError="True" ValidationGroup="BulkImport"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                    <div class="hide">
                                        <asp:Literal ID="Ltl_DownLoadCSVBulk" runat="server"></asp:Literal>
                                    </div>
                                </div>
                                <div class="col-sm-5 col-xs-12">
                                    <asp:ValidationSummary ID="ValidationSummary4" runat="server" ShowMessageBox="true"
                                        ShowSummary="false" ValidationGroup="BulkImport" HeaderText="<%$ Resources:Content,EM000001%>" />
                                    <asp:Button ID="Btn_ImportJournaling" runat="server" ValidationGroup="BulkImport" CausesValidation="True"
                                        class="btn btn-primary waves-effect btnAction" Text="<%$ Resources:Content,ImportJournaling%>" />
                                </div>
                            </div>
                        </div>
                    </div>

                </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="Btn_ImportJournaling"></asp:PostBackTrigger>
                </Triggers>
            </asp:UpdatePanel>
        </div>
    </div>

    <%--Search Option--%>
    <asp:Panel ID="Pnl_SearchLH" runat="server" DefaultButton="Btn_SrchLH">
        <div class="row">
            <div class="panel-group search-panel" id="AS_LHs" role="tablist" aria-multiselectable="true">
                <div class="col-xs-12" role="tab" id="SH_LHs">
                    <div class="card">
                        <div class="header" role="button" data-toggle="collapse" data-parent="#AS_LHs" href="#<%= CSB_LHs.ClientID%>" aria-expanded="true" aria-controls="SH_LHs">
                            <h3>
                                <%= Resources.Content.GN0000395%>
                            </h3>
                        </div>
                        <div id="CSB_LHs" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_LHs" aria-expanded="false">
                            <div class="row">
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_LHNameFilter" runat="server" MaxLength="1000"></asp:TextBox>
                                            <asp:Label ID="Label32" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN000170%>" CssClass="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_RecipientFilter" runat="server" MaxLength="1000"></asp:TextBox>
                                            <asp:Label ID="Label2" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000543%>" CssClass="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:DropDownList ID="DDL_ScopeFilter" runat="server">
                                            <asp:ListItem Text="<%$ Resources:Content,SelectScope%>" Value="-1"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,SMI0374%>" Value="Global"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,GN0000642%>" Value="Internal"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,SMI0375%>" Value="External"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_LHEmailFilter" runat="server" MaxLength="1000"></asp:TextBox>
                                            <asp:Label ID="Label1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,String389%>" CssClass="form-label"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-12">
                                    <div class="form-group form-float">
                                        <asp:Button ID="Btn_SrchLH" runat="server" CssClass="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN0000391%>" />
                                        <asp:Button ID="Btn_ClearLH" Visible="false" CssClass="btn btn-primary waves-effect" runat="server"
                                            Text="<%$ Resources:Content,String289 %>" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </asp:Panel>

    <div class="row">
        <div class="col-xs-12">
            <EM:MPGridView ID="GV_Journaling" CurrentSortExpression="JournalingId" CurrentSortDirection="Asc" CssClass="table table-bordered table-striped table-hover"
                runat="server" AllowPaging="true" AllowSorting="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>' AutoGenerateColumns="false"
                DataKeyNames='JournalingId, Name, Recipients'>
                <Columns>
                    <asp:TemplateField HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1" HeaderText='<%$ Resources:Content,GN0000370 %>'>
                        <HeaderTemplate>
                            <asp:CheckBox class="option-menu" ID="ChkBx_All" runat="server" Text=" " onclick="SetCheckedHeader(this.checked, this,'All');" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox class="option-menu" ID="ChkBx_Item" runat="server" Text=" " onclick="SetCheckedHeader(this.checked, this,'1');" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Content, strStatus %>" SortExpression="Status" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                        <ItemTemplate>
                            <asp:Label ID="Lbl_Status" runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN000170 %>" SortExpression="Name" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                        <ItemTemplate>
                            <asp:Label ID="Lbl_Name" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'></asp:Label>
                            <asp:HiddenField ID="Lbl_MailboxId" runat="server" Value='<%# DataBinder.Eval(Container, "DataItem.JournalingMailboxId") %>'></asp:HiddenField>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000543%>" SortExpression="RecipientDetail" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                        <ItemTemplate>
                            <asp:Label ID="Lbl_Recipient" runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>


                    <asp:TemplateField HeaderText="<%$ Resources:Content, Exch099 %>" SortExpression="Scope" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                        <ItemTemplate>
                            <asp:Label ID="Lbl_Scope" runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="<%$ Resources:Content, String389 %>" SortExpression="SendEmailTo" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                        <ItemTemplate>
                            <asp:Label ID="Lbl_Email" runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--<asp:TemplateField HeaderText="<%$ Resources:Content, GN0000360 %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                    <ItemTemplate>
                        <asp:LinkButton ID="LB_Edit" class="btn btn-primary waves-effect" CommandName="Details"
                            CommandArgument='<%# DataBinder.Eval(Container, "DataItem.JournalingId") %>' runat="server" Text="<%$ Resources:Content,GN0000276%>" />
                        <asp:LinkButton class="btn btn-primary waves-effect" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.JournalingId") %>'
                            ID="LB_Remove" CommandName="RemoveTag" runat="server" Text="<%$ Resources:Content,GN0000278%>" />
                        <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,CBE001%>"
                            TargetControlID="LB_Remove" runat="server">
                        </EM:ConfirmButtonExtender>
                    </ItemTemplate>
                </asp:TemplateField>--%>
                </Columns>
                <PagerTemplate>
                    <EM:Pager ID="Pager" runat="server" />
                </PagerTemplate>
            </EM:MPGridView>
        </div>
    </div>
</div>

<asp:Panel ID="Pnl_EnableDisable" runat="server" Visible="false" DefaultButton="Btn_Save">
    <div class="row">
        <div class="col-xs-12 row-label">
            <label>
                <asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:Content,Recipients%>"
                    EnableViewState="false" />:</label>
        </div>
        <div class="col-xs-12" id="div_RecipientOption" runat="server">
            <div class="form-group">
                <asp:RadioButtonList ID="Rbl_Recipients" runat="server" RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged="Rbl_Recipients_SelectedIndexChanged">
                    <asp:ListItem Text="<%$ Resources:Content,AllMailboxes%>" Value="0"></asp:ListItem>
                    <asp:ListItem Text="<%$ Resources:Content,GN0000890%>" Value="1" Selected="True"></asp:ListItem>
                </asp:RadioButtonList>
            </div>
        </div>
        <div class="col-xs-12" id="div_SelectRecipients" runat="server">
            <ajax:UpdatePanel ID="UP_Recipients" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <EM:AddSelectableSelected ID="UCRecipients" runat="server" />
                </ContentTemplate>
            </ajax:UpdatePanel>
        </div>
    </div>
    <div id="Div_EnableInputs" runat="server">
        <div class="row">
            <div class="col-sm-2 col-xs-12 row-label">
                <label>
                    <asp:Literal ID="Literal3" runat="server" Text='<%$ Resources:Content, Exch099 %>'></asp:Literal>:</label>
            </div>
            <div class="col-sm-4 col-xs-12">
                <div class="form-group">
                    <asp:DropDownList ID="DDL_Scope" runat="server">
                        <asp:ListItem Text="<%$ Resources:Content,SMI0374%>" Value="Global"></asp:ListItem>
                        <asp:ListItem Text="<%$ Resources:Content,GN0000642%>" Value="Internal"></asp:ListItem>
                        <asp:ListItem Text="<%$ Resources:Content,SMI0375%>" Value="External"></asp:ListItem>
                    </asp:DropDownList>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-2 col-xs-12 row-label">
                <label>
                    <asp:Literal ID="Literal2" runat="server" Text='<%$ Resources:Content, String389 %>'></asp:Literal>:</label>
            </div>
            <div class="col-sm-4 col-xs-12">
                <div class="form-group">
                    <asp:DropDownList ID="DDl_JournalToMbx" runat="server"></asp:DropDownList>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <asp:Button ID="Btn_Save" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                class="btn btn-primary waves-effect btnAction" ValidationGroup="Journaling" CausesValidation="true" />
            <asp:Button ID="Btn_Cancel" runat="server" Text="<%$ Resources:Content,Cancel%>"
                class="btn btn-primary waves-effect" CausesValidation="false" />
        </div>
    </div>
</asp:Panel>
