<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_Hrm_Employee_MyDigitalForm, App_Web_0uq4yejd" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl" TagPrefix="ScreenGroup" %>
<%@ Register Src="~/UserControls/DatePicker/DatePickerControl.ascx" TagName="DatePickerControl" TagPrefix="dpc" %>
<%@ Register Src="~/UserControls/Common/EmployeeSearch/EmployeeSearch.ascx" TagName="EmployeeSearchControl" TagPrefix="hims" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteTextBoxForGridView.ascx" TagName="AutoCompleteControl" TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/StudentSearch/StudentSearch.ascx" TagName="StudentSearch" TagPrefix="Std" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="ResonMasterUpdatePanel" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">
                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <div class="himssuHeader3WireBox">
                            <table>
                                <tr>
                                    <td>
                                        <div class="himsBoxContent">
                                            <div class="leftUlMenu">
                                                <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="213"
                                                    Visible="true" runat="server" />
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="row whiteboxpaddingleft">
                    <div class="himssuHeader5WireBox card card-box" id="SearchDiv" runat="server">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-search"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Search"></asp:Label>
                                        </header>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <div id="Div1" class="himssuHeader7WireBox col-md-12 pTop5 gridviewfont" runat="server">
                                        <div id="DigitalFormDiv" visible="false" runat="server">
                                            <div class="himsBoxHeader" id="CustomDiv" visible="false" runat="server">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle">
                                                    <div class="fRight">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent table-responsive">
                                                <asp:UpdatePanel ID="MenuPlanDetailUpdatePanel" runat="server" UpdateMode="Always">
                                                    <ContentTemplate>
                                                        <div id="Div5" runat="server" visible="false">
                                                            <asp:GridView ID="DigitalFormMasterGridView" runat="server" Width="100%" AutoGenerateColumns="False"
                                                                OnRowDataBound="DigitalFormMasterGridView_RowDataBound" CssClass="table table-striped table-bordered"
                                                                SkinID="" ShowHeader="true" PagerSettings-Visible="false" EmptyDataText="No records Found!!!"
                                                                DataKeyNames="Id">
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="Title" ItemStyle-Width="40%" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:LinkButton ID="TitleLinkButton" runat="server" Text='<%# Bind("Title") %>' OnClick="TitleLinkButton_Click"></asp:LinkButton>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Action Date" ItemStyle-Width="30%" SortExpression="Title" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="ActionDateLabel" runat="server" Text='<%# Bind("FormActionDateTime","{0:dd/MM/yyyy hh:mm:ss tt}") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Status" ItemStyle-Width="30%" SortExpression="Status" HeaderStyle-HorizontalAlign="Left"
                                                                        ItemStyle-Wrap="true">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="StatusLabel" runat="server" Text='<%# Bind("DigitalFormStatus") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                            </asp:GridView>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                    <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server" visible="false">
                        <div class="himsBoxHeader card-head">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-cog"></i>
                                        <asp:Label ID="NewsDetailLabel" runat="server" Text="Digital Form"></asp:Label>
                                    </header>
                                </div>
                            </div>
                            <div class="fRight mt-27 pagination display-flex">
                                <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0" CssClass="btn btn-back fas" Text="&#xf30a;  back" />
                            </div>
                        </div>
                        <asp:HiddenField ID="UserSourceTypeHiddenField" runat="server" />
                        <asp:HiddenField ID="UserSourceIdHiddenField" runat="server" />
                        <asp:HiddenField ID="DocumentNameHiddenField" runat="server" />
                        <asp:HiddenField ID="UploadConfigurationHiddenField" runat="server" />
                        <asp:HiddenField ID="ScreenIdHiddenField" runat="server" />
                        <asp:HiddenField ID="AttachmentSizeHiddenField" runat="server" />
                        <div class="himsBoxContent card-body">
                            <div class="contentHolder">
                                <div class="tableContainer">
                                    <div class="contentHolder">
                                        <asp:Panel ID="Panel2" runat="Server">
                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="CodeLabel" Text="Code" runat="server"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="CodeTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        SkinID="CustomWidthTextBox" runat="Server" MaxLength="20" Enabled="false"></asp:TextBox>
                                                    <asp:HiddenField ID="IdHiddenField" runat="server" />

                                                </div>
                                            </div>

                                            <div class="outerBox pTop5 col-md-3">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="TitleLabel" Text="Title" runat="server"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:TextBox ID="TitleTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                        SkinID="CustomWidthTextBox" runat="Server" MaxLength="100" Enabled="false"></asp:TextBox>
                                                </div>
                                            </div>

                                            <div class="outerBox11 pTop15 col-md-12" style="padding-bottom: 20px">
                                                <div class="table-responsive padd-5">
                                                    <asp:GridView runat="server" ID="DigitalFormGridView" AutoGenerateColumns="False" OnRowDataBound="DigitalFormGridView_RowDataBound"
                                                        DataKeyNames="SubFunctionalityName,UpdateFieldId,Field,FieldTypeId,DigitalFormId,EmployeeCode" EmptyDataText="No records available for the seacrh criteria!" AllowPaging="false" ShowHeader="true"
                                                        CssClass="table table-striped table-bordered table-hover more">
                                                        <Columns>
                                                            <asp:TemplateField>
                                                                <HeaderTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox ID="HeaderIsSelectCheckBox" onclick="CheckAllCheckbox(this);" runat="server" />
                                                                        <span></span>
                                                                    </label>
                                                                </HeaderTemplate>
                                                                <HeaderStyle HorizontalAlign="Center" />
                                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                                <ItemTemplate>
                                                                    <label class="rt-chkbox rt-chkbox-outline">
                                                                        <asp:CheckBox ID="IsSelectCheckBox" runat="server" />
                                                                        <span></span>
                                                                    </label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="Field" ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="Left" HeaderText="Field" />
                                                            <asp:TemplateField ItemStyle-Width="15%" HeaderText="Old Value" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:DropDownList ID="OldValueDropDownList" runat="server" Visible="false" CssClass="form-control" Width="98%" Enabled="false"></asp:DropDownList>
                                                                    <asp:TextBox ID="OldValueTextBox" runat="server" Visible="false" CssClass="form-control" Height="15px" Enabled="false"></asp:TextBox>
                                                                    <asp:Panel ID="OldValueCheckBoxPanel" runat="server" Visible="false">
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="OldValueCheckBox" runat="server" Visible="false" CssClass="form-control" Height="50px" Enabled="false"></asp:CheckBox>
                                                                            <span></span>
                                                                        </label>
                                                                    </asp:Panel>
                                                                    <dpc:DatePickerControl ID="OldValueDatePicker" runat="server" DisplayDatePicker="true" Enabled="false"
                                                                        Visible="false" />
                                                                    <acc:AutoCompleteControl ID="OldValueAutoCompleteControl" runat="server" MinimumPrefixLength="2" Enabled="false"
                                                                        MaxLength="200" DisplayLoadingStatus="true" SkinID="CustomWidthTextBox"
                                                                        Width="154px" ValidateOnTextChanged="false" Visible="false" />
                                                                    <asp:ImageButton ID="OldEmployeePhoto" Visible="false" Height="60px" Width="60px" runat="server" />
                                                                    <%--  <asp:ImageButton ID="OldFatherPhoto" Visible="false" Height="60px" Width="60px" runat="server" />
                                                                    <asp:ImageButton ID="OldMotherPhoto" Visible="false" Height="60px" Width="60px" runat="server" />
                                                                    <asp:ImageButton ID="OldRelativePhoto" Visible="false" Height="60px" Width="60px" runat="server" />--%>
                                                                    <asp:HyperLink ID="OldFileHyperLink" Visible="false" runat="server" Text="" CssClass="UploadedgetHyperLink"
                                                                        Target="_blank"></asp:HyperLink>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField ItemStyle-Width="15%" HeaderText="New Value" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:DropDownList ID="NewValueDropDownList" runat="server" Visible="false" CssClass="form-control" Width="98%"></asp:DropDownList>
                                                                    <asp:TextBox ID="NewValueTextBox" runat="server" Visible="false" CssClass="form-control" Height="15px"></asp:TextBox>
                                                                    <asp:Panel ID="NewValueCheckBoxPanel" runat="server" Visible="false">
                                                                        <label class="rt-chkbox rt-chkbox-outline">
                                                                            <asp:CheckBox ID="NewValueCheckBox" runat="server" Visible="false" CssClass="form-control" Height="50px"></asp:CheckBox>
                                                                            <span></span>
                                                                        </label>
                                                                    </asp:Panel>
                                                                    <dpc:DatePickerControl ID="NewValueDatePicker" runat="server" DisplayDatePicker="true"
                                                                        Visible="false" />
                                                                    <acc:AutoCompleteControl ID="NewValueAutoCompleteControl" runat="server" MinimumPrefixLength="2"
                                                                        MaxLength="200" DisplayLoadingStatus="true" SkinID="CustomWidthTextBox"
                                                                        Width="154px" ValidateOnTextChanged="false" Visible="false" />
                                                                    <asp:Panel ID="NewEmployeePhotoPanel" runat="server" Visible="false">
                                                                        <asp:ImageButton ID="NewEmployeePhoto" Height="60px" Width="60px" runat="server" Visible="false" /><div class="cBoth"></div>
                                                                        <a id="Browse" href="javascript:;" onclick="OpenFileUploadEmployee('<%#Eval("EmployeeCode")%>')" class="btn btn-browser"><i class="fa fa-arrow-down"></i>Browse</a>
                                                                        <asp:FileUpload ID="flUpload1" runat="server" onChange="readURLEmployee(this);" ClientIDMode="Static" Style="display: none;" AllowMultiple="false" />
                                                                        <asp:Button ID="RefreshButton" runat="server" ToolTip="Refresh" SkinID="0" Text=" Refresh" class="btn btn-refresh fas" CommandName="Page" CommandArgument="<%#((GridViewRow)Container).RowIndex%>" OnClick="RefreshButton_Click" />
                                                                        <br />
                                                                        <br />
                                                                        <asp:ImageButton ID="DeleteUploadedEmployeePhotoButton" runat="server" ToolTip="Delete" ImageUrl="~/Images/Del.png" OnClick="DeleteUploadedEmployeePhotoButton_Click" />
                                                                    </asp:Panel>
                                                                    <%-- <asp:Panel ID="NewFatherPhotoPanel" runat="server" Visible="false">
                                                                        <asp:ImageButton ID="NewFatherPhoto" Height="60px" Width="60px" runat="server" Visible="false" /><div class="cBoth"></div>
                                                                        <a id="FatherBrowse" href="javascript:;" onclick="OpenFileUploadFather('<%#Eval("StudentCode")%>')" class="btn btn-browser"><i class="fa fa-arrow-down"></i>Browse</a>
                                                                        <asp:FileUpload ID="FileUploadFather" runat="server" onChange="readURLFather(this);" ClientIDMode="Static" Style="display: none;" AllowMultiple="false" />
                                                                        <asp:Button ID="FatherPhotoRefresh" runat="server" ToolTip="Refresh" OnClick="FatherPhotoRefresh_Click" SkinID="0" Text=" Refresh" class="btn btn-refresh fas" CommandName="Page" CommandArgument="<%#((GridViewRow)Container).RowIndex%>" />
                                                                        <br />
                                                                        <br />
                                                                        <asp:ImageButton ID="FatherPhotDeleteImageButton" runat="server" ToolTip="Delete" ImageUrl="~/Images/Del.png" OnClick="FatherPhotDeleteImageButton_Click" />
                                                                    </asp:Panel>--%>
                                                                    <%--<asp:Panel ID="NewMotherPhotoPanel" runat="server" Visible="false">
                                                                        <asp:ImageButton ID="NewMotherPhoto" Height="60px" Width="60px" runat="server" Visible="false" /><div class="cBoth"></div>
                                                                        <a id="MotherBrowse" href="javascript:;" onclick="OpenFileUploadMother('<%#Eval("StudentCode")%>')" class="btn btn-browser"><i class="fa fa-arrow-down"></i>Browse</a>
                                                                        <asp:FileUpload ID="FileUploadMother" runat="server" onChange="readURLMother(this);" ClientIDMode="Static" Style="display: none;" AllowMultiple="false" />
                                                                        <asp:Button ID="MotherPhotoRefresh" runat="server" ToolTip="Refresh" OnClick="MotherPhotoRefresh_Click" SkinID="0" Text=" Refresh" class="btn btn-refresh fas" CommandName="Page" CommandArgument="<%#((GridViewRow)Container).RowIndex%>" />
                                                                        <br />
                                                                        <br />
                                                                        <asp:ImageButton ID="MotherPhotoDeleteImageButton" runat="server" ToolTip="Delete" ImageUrl="~/Images/Del.png" OnClick="MotherPhotoDeleteImageButton_Click" />
                                                                    </asp:Panel>--%>
                                                                    <%-- <asp:Panel ID="NewRelativePhotoPanel" runat="server" Visible="false">
                                                                        <asp:ImageButton ID="NewRelativePhoto" Height="60px" Width="60px" runat="server" Visible="false" /><div class="cBoth"></div>
                                                                        <a id="RelativeBrowse" href="javascript:;" onclick="OpenFileUploadRelative('<%#Eval("StudentCode")%>')" class="btn btn-browser"><i class="fa fa-arrow-down"></i>Browse</a>
                                                                        <asp:FileUpload ID="FileUploadRelative" runat="server" onChange="readURLRelative(this);" ClientIDMode="Static" Style="display: none;" AllowMultiple="false" />
                                                                        <asp:Button ID="RelativePhotoRefresh" runat="server" ToolTip="Refresh" OnClick="RelativePhotoRefresh_Click" SkinID="0" Text=" Refresh" class="btn btn-refresh fas" CommandName="Page" CommandArgument="<%#((GridViewRow)Container).RowIndex%>" />
                                                                        <br />
                                                                        <br />
                                                                        <asp:ImageButton ID="RelativePhotoImageButton" runat="server" ToolTip="Delete" ImageUrl="~/Images/Del.png" OnClick="RelativePhotoImageButton_Click" />
                                                                    </asp:Panel>--%>
                                                                    <asp:Panel ID="NewFileUploadPanel" runat="server" Visible="false">
                                                                        <asp:HyperLink ID="NewFileHyperLink" runat="server" Text="" CssClass="UploadedgetHyperLink"
                                                                            Target="_blank"></asp:HyperLink>
                                                                        <br />
                                                                        <br />
                                                                        <a href="javascript:;" onclick='OpenFileUploadGrid3(<%#Eval("UpdateFieldId")%>);' class="btn btn-browser"><i class="fa fa-arrow-down"></i>Browse</a>
                                                                        <asp:FileUpload ID="DocumentFileUpload" runat="server" onChange="readURLDocument(this);" ClientIDMode="Static" Style="display: none;" AllowMultiple="false" />
                                                                        <asp:Button ID="DocumentFileRefresh" runat="server" OnClick="DocumentRefreshbutton_Click" SkinID="0" Text=" Refresh" class="btn btn-refresh fas" CommandName="Page" CommandArgument="<%#((GridViewRow)Container).RowIndex%>" />
                                                                        <br />
                                                                        <br />
                                                                        <asp:ImageButton ID="DocumentDeleteImageButton" runat="server" ToolTip="Delete" ImageUrl="~/Images/Del.png" OnClick="DocumentDeleteImageButton_Click" CommandName="Page" CommandArgument="<%#((GridViewRow)Container).RowIndex%>" />
                                                                    </asp:Panel>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField ItemStyle-Width="20%" HeaderText="Remark" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:TextBox ID="RemarkTextBox" runat="server" Text='<%# Bind("Remark") %>' CssClass="form-control" MaxLength="500" TextMode="MultiLine"></asp:TextBox>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <PagerSettings Visible="False" />
                                                    </asp:GridView>

                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../JavaScript/rjs/encrypt/custom-tag-master-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/document")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        function CheckAllCheckbox(e) {
            var t = e.closest('Table');
            for (i = 1; i < t.rows.length; i++) {
                if (!t.rows[i].cells[0].getElementsByTagName("INPUT")[0].disabled) {
                    t.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = e.checked;
                }
            }
        }
    </script>
</asp:Content>
