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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" 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" %>

<asp:Panel ID="Pnl_Listing" runat="server">

    <asp:Panel ID="Panel5" runat="server" DefaultButton="btnSGAddLocation">

        <div class="card" id="tblLocations" runat="server">
            <div class="header">
                <h3>
                    <asp:Literal ID="Literal13" runat="server" Text='<%$ Resources:Content, steStorageLocations %>' EnableViewState="false"></asp:Literal>
                </h3>
            </div>
            <div class="body">
                <div id="trListing" runat="server">
                    <div class="row Div_OpsRow" id="Div_OpsRow" runat="server">
                        <div class="col-xs-12">
                            <div class="card">
                                <div class="header">
                                    <h3>
                                        <%= Resources.Content.GN00001320%>                                                                                                                                 
                                    </h3>
                                </div>
                                <div class="body">
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:Button ID="btnAddNewLocation" class="btn btn-primary waves-effect btnAction" CausesValidation="false" runat="server" Text='<%$ Resources:Content,strAddNewStorageLocation %>' />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <EM:MPGridView ID="GV_Locations" CurrentSortExpression="Locations" CurrentSortDirection="Asc"
                                CssClass="table table-bordered table-striped table-hover" runat="server" AllowPaging="false" EmptyDataText='<%$ Resources:Content, GN00001375 %>'
                                AutoGenerateColumns="false" DataKeyNames='LocationID'>
                                <Columns>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, strStorageLocationPath %>"
                                        HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                        <ItemTemplate>
                                            <asp:Label ID="lblLocation" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Path")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, strMaxSizeGBs %>"
                                        HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                        <ItemTemplate>
                                            <asp:Label ID="lblMaxSize" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.MaxSizeInGBs") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText='<%$ Resources:Content, maxFileUploadSize %>' HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                        <ItemTemplate>
                                            <asp:Label ID="Lbl_MaxFileSizeMBs" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000850 %>"
                                        HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                        <ItemTemplate>
                                            <div id="Div_Customers" runat="server" />
                                            <div id="Div_expandCustomers" runat="server" class="cursor-pointer" />
                                            <div id="HF_DataCustomers" runat="server" style="display: none;" />
                                            <div id="HF_FullDataCustomers" runat="server" style="display: none;" />
                                            <asp:HiddenField ID="HF_OpCustomers" runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000360 %>"
                                        HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                        <ItemTemplate>
                                            <asp:LinkButton CssClass="btn btn-primary waves-effect" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.LocationID")%>'
                                                ID="LB_Edit" CommandName="EditRow" runat="server" Text="<%$ Resources:Content,GN0000276%>" CausesValidation="false" />
                                            <asp:LinkButton CssClass="btn btn-primary waves-effect btnAction" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.LocationID")%>'
                                                ID="LB_Remove" CommandName="Remove" runat="server" Text="<%$ Resources:Content,GN0000278%>" CausesValidation="false" />
                                            <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,strSureToDeleteStorageLocation%>"
                                                TargetControlID="LB_Remove" runat="server">
                                            </EM:ConfirmButtonExtender>

                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </EM:MPGridView>
                        </div>
                    </div>
                </div>

                <div id="Div_AddLocations" runat="server" visible="false">
                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            *<asp:Literal ID="Literal14" runat="server" Text='<%$ Resources:Content, strStorageLocationPath %>' EnableViewState="false"></asp:Literal>: 
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_Path" runat="server"></asp:TextBox>
                                </div>
                            </div>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ValidationGroup="Location" ControlToValidate="TxBx_Path"
                                Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegExpForLocalAndUNCPath" ControlToValidate="TxBx_Path" runat="server"
                                ErrorMessage='<%$ Resources:Content, strPathIsInValid%>' ValidationExpression="^[a-zA-Z]\:\\.*|^\\\\.*"
                                ValidationGroup="Location">
                            </asp:RegularExpressionValidator>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            *<asp:Literal ID="Literal15" runat="server" Text='<%$ Resources:Content, strMaxSizeGBs%>' EnableViewState="false"></asp:Literal>: 
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="txtSGLocationMaxSize" runat="server"></asp:TextBox>
                                </div>
                            </div>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ValidationGroup="Location" ControlToValidate="txtSGLocationMaxSize"
                                Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegEVForInteger" ControlToValidate="txtSGLocationMaxSize" runat="server"
                                ErrorMessage='<%$ Resources:Content, strOnlyNumbersAllowed%>' ValidationExpression="\d+">
                            </asp:RegularExpressionValidator>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            *<asp:Literal ID="Literal1" runat="server" Text='<%$ Resources:Content, strMaxFileSizeMBs%>' EnableViewState="false"></asp:Literal>: 
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_MaxFileSizeMBs" runat="server"></asp:TextBox>
                                </div>
                            </div>
                            <asp:RequiredFieldValidator ID="RFV_TxBx_MaxFileSizeMBs" runat="server" ValidationGroup="Location" ControlToValidate="TxBx_MaxFileSizeMBs"
                                Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="REV_TxBx_MaxFileSizeMBs" ControlToValidate="TxBx_MaxFileSizeMBs" runat="server"
                                ErrorMessage='<%$ Resources:Content, strOnlyNumbersAllowed%>' ValidationExpression="\d+">
                            </asp:RegularExpressionValidator>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12 row-label">
                            <asp:Label ID="Label4" runat="server" Text="<%$ Resources:Content,GN0000850 %>" />:
                        </div>
                        <div class="col-xs-12">
                            <EM:AddSelectableSelected ID="UCCustomer" runat="server" />
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <asp:Button ID="btnSGAddLocation" runat="server" Text='<%$ Resources:Content,GN0000659 %>' CausesValidation="true" ValidationGroup="Location" class="btn btn-primary waves-effect btnAction" />
                            <asp:Button ID="BtnCancel" CausesValidation="false" runat="server" Text='<%$ Resources:Content,GN0000572 %>' class="btn btn-primary waves-effect" />

                            <asp:ValidationSummary HeaderText='<%$ Resources:Content,EM000001 %>' ID="ValidationSummary2"
                                runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="Location" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </asp:Panel>
</asp:Panel>
