<%@ page maintainscrollpositiononpostback="true" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="BaseFramework_ConfigurationFramework_Configuration, App_Web_rrg1aila" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" TagPrefix="cc1" Namespace="AjaxControlToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <style>
        #DetailModal p {
            text-align: unset;
        }
    </style>
    <asp:UpdatePanel ID="updtProgressNotes" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <aside class="main-sidebar pre-scrollable" style="position: fixed; height: 100%">
                <section class="sidebar">
                    <div class="input-group" style="width: 100%; height: 40px;">
                        <input type="text" name="q" class="form-control" placeholder="Search..." style="margin-left: 15px; margin-top: 10px; background-color: #222d32; color: #b8c7ce; border-color: gray !important" />
                    </div>
                    <ul class="sidebar-menu">
                        <li id="rptDiv" runat="server" class="treeview">
                            <asp:Repeater ID="rptModules" runat="server" OnItemCommand="rptModules_ItemCommand" OnItemDataBound="rptModules_ItemDataBound">
                                <ItemTemplate>
                                    <asp:Image runat="server" ID="Image1" Style="vertical-align: top" Visible="false" />
                                    <asp:Label ID="ConfigurationLevelLabel" Text='<%# DataBinder.Eval(Container.DataItem,"ConfigLevelId") %>' runat="server" Visible="false" />
                                    <asp:LinkButton ID="lnkName" runat="server" ToolTip='<%# Bind("ConfigLevelName") %>'
                                        CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ConfigLevelId") %>' CommandName="Filter"
                                        Text='<%# DataBinder.Eval(Container.DataItem,"ConfigLevelName") %>'></asp:LinkButton>
                                </ItemTemplate>
                            </asp:Repeater>
                        </li>
                    </ul>
                </section>
            </aside>
            <div class="divcontentpagemargin">

                <div class="row whiteboxpaddingleft">
                    <div class="himssuHeader1WireBox card card-box">
                        <div class="himsBoxHeader card-head" id="Div4" runat="server" visible="True">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText fLeft">
                                    <header>
                                        <i class="fal fa-cog"></i>
                                        <asp:Label ID="Label4" Text="Configuration" runat="server" />
                                    </header>
                                </div>
                            </div>
                        </div>
                        <div id="DetailModal" class="modal fadeInDown" role="dialog">
                            <div class="modal-dialog">
                                <!-- Modal content-->
                                <div class="modal-content padd-0">
                                    <div class="modal-body">
                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                        <!--Your modal content goes here-->
                                        <div id="DetailDescription">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0" style="vertical-align: top">
                                        <tr>
                                            <td>
                                                <div class="himssuHeader6WireBox col-md-12">
                                                    <div class="himsBoxHeader card-head inner">
                                                        <div class="leftdiv">
                                                        </div>
                                                        <div class="himsBoxTitle">
                                                            <div class="headerText">
                                                                <div class="">
                                                                    <header>
                                                                        Configuration Type :
                                                                                <asp:Label ID="ConfigurationTypeLabel" runat="server"></asp:Label>
                                                                    </header>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="himsBoxContent">
                                                        <asp:Panel ID="pnlGrid" runat="server" meta:resourcekey="pnlGridResource1">
                                                            <asp:Panel ID="pnlSettings" runat="server" Visible="False"
                                                                meta:resourcekey="pnlSettingsResource1">
                                                                <div>
                                                                    <div id="Div14" runat="server" class="table-responsive">
                                                                        <asp:GridView SkinID="FixedHeaderGridView" ID="grdSettings" runat="server" AutoGenerateColumns="False"
                                                                            OnRowDataBound="grdSettings_RowDataBound" DataKeyNames="ConfigLevelId,ModuleID"
                                                                            EmptyDataText="Zero Records"
                                                                            ShowHeader="True" Width="100%" meta:resourcekey="grdSettingsResource1" CssClass="table table-striped table-bordered table-hover">
                                                                            <Columns>
                                                                                <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource1">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("ModuleID") %>'
                                                                                            meta:resourcekey="Label3Resource1"></asp:Label>
                                                                                    </ItemTemplate>
                                                                                    <ItemStyle Width="0%" />
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource2">
                                                                                    <ItemTemplate>
                                                                                        <asp:CheckBox ID="CheckBox1" runat="server"
                                                                                            meta:resourcekey="CheckBox1Resource1" />
                                                                                    </ItemTemplate>
                                                                                    <ItemStyle Width="0%" />
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Module" HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label CssClass="boxEllips" ToolTip='<%# Bind("ModuleTitle") %>' ID="Label4"
                                                                                            runat="server" Text='<%# Bind("ModuleTitle") %>' Width="190px"></asp:Label>
                                                                                    </ItemTemplate>
                                                                                    <ItemStyle HorizontalAlign="Left" Width="190px" />
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Key" meta:resourcekey="TemplateFieldResource3" HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label CssClass="boxEllips" ToolTip='<%# Bind("ModuleItemKey") %>' ID="Label1"
                                                                                            runat="server" Text='<%# Bind("ModuleItemKey") %>' Width="250px"></asp:Label>
                                                                                        <asp:LinkButton CssClass="boxEllips" ID="ConfigDetailButton" runat="server" Text='<%# Bind("ModuleItemKey") %>' CommandName="Select"
                                                                                            SkinID="0" OnClick="ConfigDetailButton_Click" Visible="false"></asp:LinkButton>
                                                                                    </ItemTemplate>
                                                                                    <ItemStyle HorizontalAlign="Left" Width="250px" />
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField HeaderText="Value" meta:resourcekey="TemplateFieldResource4" HeaderStyle-HorizontalAlign="Left">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="Label2" CssClass="boxEllips" ToolTip='<%# Bind("ModuleItemValue") %>'
                                                                                            runat="server" Text='<%# Bind("ModuleItemValue") %>' Width="200px"></asp:Label>
                                                                                    </ItemTemplate>
                                                                                    <ItemStyle HorizontalAlign="Left" Width="100px" />
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField meta:resourcekey="TemplateFieldResource5">
                                                                                    <ItemTemplate>
                                                                                        <asp:LinkButton ID="lnkGlobal" runat="server"
                                                                                            CommandName='Keyvalue' Text="Edit"
                                                                                            meta:resourcekey="lnkGlobalResource1" OnClick="lnkGlobal_Click"></asp:LinkButton>
                                                                                    </ItemTemplate>
                                                                                    <ItemStyle HorizontalAlign="Center" Width="200px" />
                                                                                </asp:TemplateField>
                                                                                <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource6">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="lblValidType" runat="server"
                                                                                            Text='<%# Bind("ModuleValidationType") %>'
                                                                                            meta:resourcekey="lblValidTypeResource1"></asp:Label>
                                                                                    </ItemTemplate>
                                                                                    <ItemStyle Width="0%" />
                                                                                </asp:TemplateField>
                                                                                <asp:CommandField ShowEditButton="True" Visible="false"
                                                                                    meta:resourcekey="CommandFieldResource1">
                                                                                    <ItemStyle Width="0%" />
                                                                                </asp:CommandField>
                                                                            </Columns>
                                                                            <PagerSettings Visible="False" />
                                                                        </asp:GridView>
                                                                    </div>
                                                                </div>
                                                            </asp:Panel>
                                                            <asp:Panel ID="pnlDevice" runat="server" Visible="False"
                                                                meta:resourcekey="pnlDeviceResource1">
                                                                <div>
                                                                    <asp:GridView ID="grdDevice" runat="server" AutoGenerateColumns="False" OnRowCommand="grdDevice_RowCommand"
                                                                        EmptyDataText="No records Found" ShowHeader="True" Width="100%"
                                                                        SkinID="FixedHeaderGridView" meta:resourcekey="grdDeviceResource1">
                                                                        <Columns>
                                                                            <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource7">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblId" runat="server" Text='<%# Bind("ModuleID") %>'
                                                                                        meta:resourcekey="lblIdResource1"></asp:Label>
                                                                                </ItemTemplate>
                                                                                <ItemStyle Width="0%" />
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="Device Key" HeaderStyle-HorizontalAlign="Left"
                                                                                meta:resourcekey="TemplateFieldResource8">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblTitle" runat="server" Text='<%# Bind("ModuleTitle") %>'
                                                                                        meta:resourcekey="lblTitleResource1"></asp:Label>
                                                                                </ItemTemplate>
                                                                                <ItemStyle Width="300px" />
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField HeaderText="Path" meta:resourcekey="TemplateFieldResource9" HeaderStyle-HorizontalAlign="Left">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblPath" runat="server"
                                                                                        Text='<%# Bind("LocalSettingsDevicePath") %>'
                                                                                        meta:resourcekey="lblPathResource1"></asp:Label>
                                                                                    <asp:DropDownList ID="DropDownList2" runat="server" Visible="False"
                                                                                        meta:resourcekey="DropDownList2Resource1">
                                                                                    </asp:DropDownList>
                                                                                </ItemTemplate>
                                                                                <ItemStyle Width="300px" />
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField meta:resourcekey="TemplateFieldResource10" HeaderStyle-HorizontalAlign="Left">
                                                                                <ItemTemplate>
                                                                                    <asp:LinkButton ID="lnkDevice" runat="server" CommandArgument='<%# Eval("ModuleRowID") %>'
                                                                                        CommandName='Keyvalue' Text="Select Path"
                                                                                        meta:resourcekey="lnkDeviceResource1"></asp:LinkButton>
                                                                                </ItemTemplate>
                                                                                <ItemStyle Width="15%" />
                                                                            </asp:TemplateField>
                                                                            <asp:CommandField ShowEditButton="True" Visible="False"
                                                                                meta:resourcekey="CommandFieldResource2">
                                                                                <ItemStyle Width="0%" />
                                                                            </asp:CommandField>
                                                                            <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource11">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblMachineName" runat="server"
                                                                                        Text='<%# Bind("LocalSettingsMachineTitle") %>'
                                                                                        meta:resourcekey="lblMachineNameResource1"></asp:Label>
                                                                                </ItemTemplate>
                                                                                <ItemStyle Width="0%" />
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField Visible="False" meta:resourcekey="TemplateFieldResource12">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lblDeviceId" runat="server"
                                                                                        Text='<%# Bind("LocalSettingsDeviceID") %>'
                                                                                        meta:resourcekey="lblDeviceIdResource1"></asp:Label>
                                                                                </ItemTemplate>
                                                                                <ItemStyle Width="0%" />
                                                                            </asp:TemplateField>
                                                                        </Columns>
                                                                    </asp:GridView>
                                                                </div>
                                                            </asp:Panel>
                                                        </asp:Panel>
                                                        <asp:Panel ID="pnlResetPassword" Visible="False" runat="server"
                                                            meta:resourcekey="pnlResetPasswordResource1">
                                                            &nbsp;<table cellspacing="0" cellpadding="0" width="60%" border="0" style="border-collapse: collapse; border-color: #111111;">
                                                                <tr valign="top">
                                                                    <td>
                                                                        <h3>Electronic Signature Reset Password</h3>
                                                                        <asp:Label ID="MyError" CssClass="ErrorText" EnableViewState="False" runat="server"
                                                                            ForeColor="Red" meta:resourcekey="MyErrorResource1" /><br />
                                                                        <table width="600" cellpadding="0" cellspacing="0" border="1">
                                                                            <tr>
                                                                                <td style="width: 30%">
                                                                                    <strong>Current Password</strong>&nbsp;
                                                                                </td>
                                                                                <td align="left">
                                                                                    <asp:TextBox ID="currentpwd" runat="server" Width="139px"
                                                                                        meta:resourcekey="currentpwdResource1"></asp:TextBox>
                                                                                    <asp:RequiredFieldValidator ControlToValidate="currentpwd" Display="Dynamic" Font-Names="verdana"
                                                                                        Font-Size="11px" ErrorMessage="'Current Password' must not be left blank." runat="server"
                                                                                        ID="Requiredfieldvalidator5"
                                                                                        meta:resourcekey="Requiredfieldvalidator5Resource1"></asp:RequiredFieldValidator>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td style="width: 30%">
                                                                                    <strong>New Password</strong>&nbsp;
                                                                                </td>
                                                                                <td align="left">
                                                                                    <asp:TextBox ID="newpwd" TextMode="Password" runat="server"
                                                                                        meta:resourcekey="newpwdResource1"></asp:TextBox>
                                                                                    <asp:RequiredFieldValidator ControlToValidate="newpwd" Display="Dynamic" Font-Names="verdana"
                                                                                        Font-Size="11px" ErrorMessage="'New Password' must not be left blank." runat="server"
                                                                                        ID="Requiredfieldvalidator6"
                                                                                        meta:resourcekey="Requiredfieldvalidator6Resource1"></asp:RequiredFieldValidator>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td style="width: 30%">
                                                                                    <strong>Confirm Password</strong>
                                                                                </td>
                                                                                <td align="left">
                                                                                    <asp:TextBox ID="confirmpwd" TextMode="Password" runat="server"
                                                                                        meta:resourcekey="confirmpwdResource1"></asp:TextBox>
                                                                                    <asp:RequiredFieldValidator ControlToValidate="confirmpwd" Display="Dynamic" Font-Names="verdana"
                                                                                        Font-Size="11px" ErrorMessage="'Confirm New Password' must not be left blank."
                                                                                        runat="server" ID="Requiredfieldvalidator7"
                                                                                        meta:resourcekey="Requiredfieldvalidator7Resource1"></asp:RequiredFieldValidator>
                                                                                    <asp:CompareValidator ControlToValidate="confirmpwd" ControlToCompare="newpwd" Display="Dynamic"
                                                                                        Font-Names="verdana" Font-Size="11px" ErrorMessage="Password fields do not match."
                                                                                        runat="server" ID="CompareValidator1"
                                                                                        meta:resourcekey="CompareValidator1Resource1"></asp:CompareValidator>
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td style="width: 30%">&nbsp;
                                                                                </td>
                                                                                <td>&nbsp;
                                                                                </td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td style="width: 30%">&nbsp;
                                                                                </td>
                                                                                <td align="left">
                                                                                    <asp:Button ID="UpdateBtn" runat="server" OnClick="UpdateBtn_Click" Text="Reset Password"
                                                                                        CausesValidation="False" meta:resourcekey="UpdateBtnResource1" />
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </asp:Panel>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                </div>
                </tr>
                    </table>
            </div>
            </div>       
        </ContentTemplate>
    </asp:UpdatePanel>
    <script data-main="../../../JavaScript/rjs/configuration" src="../../../JavaScript/rjs/require.js"></script>
    <script type="text/javascript">
        function ConfigDetails(Obj) {
            $('#DetailModal').modal('toggle');
            $('#DetailDescription').html('');
            $('#DetailDescription').append(Obj);
        }
        //Added by dhananajay for mantis Start- 40740
        function RedirectToConfiguration(ConfigurationURL) {
            var newTab = window.open(ConfigurationURL, '_blank');
            window.location.href = '../MyDashBoard.aspx';
        }
        //Added by dhananajay for mantis End - 40740
    </script>
</asp:Content>
