<%@ page title="" language="C#" masterpagefile="~/MasterFile/TimeCheck.master" autoeventwireup="true" inherits="Masters_TA_UI_MasterTaxPolicyAdd, App_Web_u3put1cg" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPH" Runat="Server">
    <script language="javascript" type="text/javascript">

        function CheckTaxslab() {
            if (document.getElementById("ctl00_BodyContentPH_chkPermission").checked == true) {
                document.getElementById("ctl00_BodyContentPH_txt_MaxHrsMonth").disabled = false;
                document.getElementById("ctl00_BodyContentPH_txt_MaxInstances").disabled = false;
                //  document.getElementById("ctl00_BodyContentPH_butBeforeShiftMax").disabled = false;
                document.getElementById("ctl00_BodyContentPH_txt_MaxHrsMonth").value = "";
                document.getElementById("ctl00_BodyContentPH_txt_MaxInstances").value = "";
                document.getElementById("ctl00_BodyContentPH_txt_MaxHrsInstance").value = "";
                document.getElementById("ctl00_BodyContentPH_txt_MaxHrsInstanceHdn").value = "";
                document.getElementById("ctl00_BodyContentPH_chkBeforeLeave").disabled = false;
                document.getElementById("ctl00_BodyContentPH_chkAfterLeave").disabled = false;
                document.getElementById("ctl00_BodyContentPH_chkBeforeLeave").checked = false;
                document.getElementById("ctl00_BodyContentPH_chkAfterLeave").checked = false;
            }
            else {
                document.getElementById("ctl00_BodyContentPH_txt_MaxHrsMonth").disabled = true;
                document.getElementById("ctl00_BodyContentPH_txt_MaxInstances").disabled = true;
                // document.getElementById("ctl00_BodyContentPH_butBeforeShiftMax").disabled = true;
                document.getElementById("ctl00_BodyContentPH_txt_MaxHrsMonth").value = "";
                document.getElementById("ctl00_BodyContentPH_txt_MaxInstances").value = "";
                document.getElementById("ctl00_BodyContentPH_txt_MaxHrsInstance").value = "";
                document.getElementById("ctl00_BodyContentPH_txt_MaxHrsInstanceHdn").value = "";
                document.getElementById("ctl00_BodyContentPH_chkBeforeLeave").checked = false;
                document.getElementById("ctl00_BodyContentPH_chkAfterLeave").checked = false;
                document.getElementById("ctl00_BodyContentPH_chkBeforeLeave").disabled = true;
                document.getElementById("ctl00_BodyContentPH_chkAfterLeave").disabled = true;
            }
        }
    </script>
    <script src="../js/maxLength.js" type="text/javascript"></script>

    <script src="../plugins/daterangepicker/moment.js" type="text/javascript"></script>

    <script src="../plugins/datepicker/jquery-1.11.1.min.js"></script>

    <script language="javascript" src="../js/jquery.autocomplete.js" type="text/javascript"></script>

    <script src="../plugins/datepicker/bootstrap-datepicker.js"></script>

     <div class="content-header">
        <h1 style="background-image: url('../dist/img/leave-policy.png'); background-repeat: no-repeat; padding-left: 35px">
            <%--<span>
                <img src="../dist/img/policy-icon.png" style="padding-right: 10px;"></span>--%>
            <asp:Label ID="lbl_HeaderTaxPolicy" runat="server"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
     <div class="content">
        <div>
            <!--FILTERS-->
            <div class="exda-table">
                <h6>
                    <span style="color: Red">|</span>
                    <asp:Label ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                    (1
                    No.)</h6>
            </div>
            <!--FILTERS-->
            <div class="emp-filter">
                <div class="row">
                    <div class="form-horizontal">
                        <div class="row form-group">
                            <div class="col-md-12">
                                <div class="col-md-2">
                                    <asp:Label ID="lblCompany" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlCompany" runat="server" AppendDataBoundItems="true" CssClass="form-control select2 Man-dat">
                                        <asp:ListItem Value="0" Text="-Select-"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lbl_PolicyName" runat="server" class="control-label"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:TextBox onpaste="return true" ID="txt_PolicyName" runat="server" CssClass="form-control mandatory"
                                        MaxLength="40" oncut="return false" onDelete="return false" ondrop="return false"
                                        onkeyPress="return chkMaxLen(event,this,40,MaxLength)"></asp:TextBox>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-12">
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpCategory" runat="server" class="control-label"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEmpCatagory" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true" OnDataBound="ddlEmpCatagory_DataBound">
                                        <asp:ListItem Value="0" Selected="True" Text="All"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblEmpType" runat="server" class="control-label"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlEmpType" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true" OnDataBound="ddlEmpType_DataBound">
                                        <asp:ListItem Value="0" Selected="True" Text="All"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-md-12">
                                <div class="col-md-2">
                                    <asp:Label ID="lblGender" runat="server" class="control-label"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlGender" runat="server" CssClass="form-control select2">
                                        <asp:ListItem Value="0" Text="Both"></asp:ListItem>
                                        <asp:ListItem Value="1" Text="Male"></asp:ListItem>
                                        <asp:ListItem Value="2" Text="Female"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                                <div class="col-md-1">
                                </div>
                                <div class="col-md-2">
                                    <asp:Label ID="lblReligion" runat="server" class="control-label"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <asp:DropDownList ID="ddlReligion" runat="server" CssClass="form-control select2"
                                        AppendDataBoundItems="true" OnDataBound="ddlReligion_DataBound">
                                        <asp:ListItem Value="0" Selected="True" Text="All"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                        </div>
<%--                        <div class="row">
                            <div class="col-md-8">
                            </div>
                            <div class="col-md-3 pull-right-button">
                                <asp:LinkButton ID="btn_View" CssClass="btn view-btn fa-eye" runat="server" OnClick="btn_View_Click"
                                    Style="margin-bottom: 10px;" />
                            </div>
                        </div>--%>
                      <%--  <div class="row">
                            <div class="col-md-12" style="color: red">
                                Service Period - Avail is 0 time(s) - No limit. i.e User can avail the leave to any number of times as per the policy creation.
                                            <br />
                                Appl.After (Days) - Applicable After Days;
                                &nbsp;&nbsp;
                                M.Acc. Days - Maximum Accumulation Days;
                            </div>
                        </div>--%>
                        <!--3-->
                        <div runat="server" id="PH_DynmCtrlDiv">
                            <div class="row">
                                <div class="lve-polhdr1">
                                    <h3>
                                        <asp:Label ID="lbl_LeaveConfi" runat="server" Text="Leave Configuration"></asp:Label></h3>
                                </div>
                            </div>
                            <!--TABLE-->
                            <div class="lvepol-table">
                                <div class="row">
                                    <div class="table-responsive">
                                        <asp:Panel ID="PH_DynmCtrl" runat="server" EnableViewState="true" Style="width: 1570px; overflow: auto;">
                                        </asp:Panel>
                                    </div>
                                </div>
                                <div class="clearfix">
                                </div>
                            </div>
                        </div>
                        <!--TABLE-->
                        <!--4-->
                        <div style="margin-top: 15px">
                            <div class="row">
                                <div class="lve-polhdr2">
                                    <h3>
                                        <asp:CheckBox ID="chkTax" runat="server" OnClick="javascript:return checkTaxslab();"
                                            CssClass="checkbox checkbox-primary" />
                                    </h3>
                                </div>
                            </div>
                            <div class="row">
                                <div class="lve-polhdr4">
                                    <div class="col-md-12">
                                        <div class="form-group" style="margin-bottom: 0px;">
                                            <asp:Label ID="lbl_MaxPermissionHoursPerMonth" CssClass="col-sm-2 control-label con-top"
                                                runat="server"></asp:Label>
                                            <div class="col-sm-3">
                                                <asp:TextBox onpaste="return true" ID="txt_MaxHrsMonth" Enabled="false" runat="server"
                                                    CssClass="form-control" MaxLength="5" onblur="return validatePermissionMonth();"
                                                    onchange="ValidatePermissionHrs();"></asp:TextBox>&nbsp;
                                                <cc1:MaskedEditExtender ID="MaxHrsPerMonth" runat="server" TargetControlID="txt_MaxHrsMonth"
                                                    InputDirection="RightToLeft" MaskType="Time" Mask="99:99" AcceptAMPM="false"
                                                    ClearTextOnInvalid="true" ErrorTooltipEnabled="true">
                                                </cc1:MaskedEditExtender>
                                            </div>
                                            <div class="col-sm-1">
                                            </div>
                                            <asp:Label ID="lbl_MaxNoOfInstancesPerMonth" runat="server" CssClass="col-sm-2 control-label con-top"></asp:Label>
                                            <div class="col-sm-3">
                                                <asp:TextBox onpaste="return true" CssClass="form-control" ID="txt_MaxInstances"
                                                    Enabled="false" MaxLength="1" onkeypress="return number_only(event,this);" runat="server"
                                                    onblur="return ValidatePermissionHrs();" onDrop="return false;"></asp:TextBox>
                                                <asp:HiddenField ID="txt_MaxHrsInstanceHdn" runat="server" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <asp:Label ID="lblminHrs_Instance" runat="server" CssClass="col-sm-2 control-label con-top"></asp:Label>
                                            <div class="col-sm-3">
                                                <asp:TextBox onpaste="return true" ID="txtMinHrs_Instance" runat="server"
                                                    CssClass="form-control" onblur="return chkPermission(event,Permission);" MaxLength="5"
                                                    
                                                    onDrop="return false;" onCut="return false;"></asp:TextBox>
                                                <%--onkeydown="return key_press_nokey(event)"--%>
                                                <%--onkeypress="return AcceptTab(event);"--%>
                                            </div>
                                            <div class="col-sm-1">
                                            </div>
                                            <asp:Label ID="lbl_MaxPermissionHoursPerInstance" runat="server" CssClass="col-sm-2 control-label con-top"></asp:Label>
                                            <div class="col-sm-3">
                                                <asp:TextBox onpaste="return true" ID="txt_MaxHrsInstance" runat="server"
                                                    CssClass="form-control" onblur="return chkPermission(event,Permission);" MaxLength="5"
                                                    
                                                    onDrop="return false;" onCut="return false;"></asp:TextBox>
                                                <%--onkeydown="return key_press_nokey(event)"--%>
                                                <%--onkeypress="return AcceptTab(event);"--%>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <div class="col-sm-6">
                                                <div class="col-md-5 pad-left7-right-1">
                                                    <asp:CheckBox ID="chkBeforeLeave" runat="server" Enabled="false" CssClass="checkboxShift checkboxShift-primary" />
                                                </div>
                                                &nbsp;&nbsp;
                                                <div class="col-md-6 pad-left7-right-1">
                                                    <asp:CheckBox ID="chkAfterLeave" runat="server" Enabled="false" CssClass="checkboxShift checkboxShift-primary" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="clearfix">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--5-->
                        <div>
                            <div class="row">
                                <div class="lve-polhdr3">
                                    <h3>
                                        <asp:CheckBox ID="chkOverTimeType" runat="server" OnClick="javascript:return CheckOverTimeType()"
                                            CssClass="checkbox checkbox-primary" /></h3>
                                </div>
                            </div>
                            <div class="row">
                                <div class="lve-polhdr5">
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <div class="col-md-5">
                                                <ul class="list-inline mas-ulbg">
                                                    <li class="list-mar3">
                                                        <asp:RadioButton ID="rbt_HourWise" runat="server" Enabled="false" GroupName="OT"
                                                            CssClass="radio radio-primary" />
                                                    </li>
                                                    <li class="list-mar3">
                                                        <asp:RadioButton ID="rbt_DayWise" runat="server" Enabled="false" GroupName="OT" CssClass="radio radio-primary" />
                                                    </li>
                                                </ul>
                                            </div>
                                            <div class="col-sm-1">
                                            </div>
                                            <asp:Label ID="lblValidsDays" runat="server" Text="Comp Off Validity Days" CssClass="col-sm-2"></asp:Label>
                                            <div class="col-sm-3">
                                                <asp:TextBox ID="txtValidsDays" runat="server" CssClass="form-control" MaxLength="3"
                                                    onkeypress="return numbers_dot(event,this)" onpaste="return true" onCut="return false;"
                                                    onDrop="return false;" Enabled="false"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <asp:Label ID="lblHalfDayComoff" runat="server" CssClass="col-sm-2 control-label con-top"
                                                Text="Min Extra Hrs for Half Day Comp Off"></asp:Label>
                                            <div class="col-sm-3">
                                                <asp:TextBox ID="txtHalfDayComoff" runat="server" CssClass="form-control" onCut="return false"
                                                    onpaste="return true" MaxLength="5" onDrop="return false" Enabled="false"></asp:TextBox>
                                            </div>
                                            <div class="col-sm-1">
                                            </div>
                                            <asp:Label ID="lblFullDayComoff" runat="server" CssClass="col-sm-2" Text="Min Extra Hrs for Full Day Comp Off"></asp:Label>
                                            <div class="col-sm-3">
                                                <asp:TextBox onpaste="return true" ID="txtFullDayComoff" runat="server" CssClass="form-control"
                                                    onCut="return false" MaxLength="5" onDrop="return false" Enabled="false"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="clearfix">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div>
                           <%-- <div class="col-md-6">
                                <asp:UpdatePanel ID="upLeave" runat="server">
                                    <ContentTemplate>
                                        <asp:Panel ID="pnlProgress" runat="server" Style="display: none;">
                                            <asp:Panel ID="pnlLoading" runat="server" HorizontalAlign="center">
                                                <div class="InsideProgressBar">
                                                    <div class="row" style="margin-top: 10px">
                                                        <img src="../dist/img/logo-Progress.png" />
                                                    </div>
                                                    <div class="row" style="min-width: 280px">
                                                        <img src="../dist/img/default.gif" style="width: 100px" />
                                                    </div>
                                                    <div class="row" style="margin-bottom: 10px">
                                                        <asp:Label ID="lblLoading" runat="server" ForeColor="black" Style="text-align: center"
                                                            Text="Please Wait..." Font-Bold="true" Font-Size="12px" Font-Italic="true" Font-Family="Arial"></asp:Label>
                                                    </div>
                                                    <div class="clear clearfix">
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                        </asp:Panel>
                                        <asp:HiddenField ID="hdnProgress" runat="server" />
                                        <cc1:ModalPopupExtender ID="popupProgress" runat="server" TargetControlID="hdnProgress"
                                            BackgroundCssClass="ModalPopup" PopupControlID="pnlProgress" BehaviorID="popupProgress">
                                        </cc1:ModalPopupExtender>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
                            <div class="col-md-6" align="left">
                                <div class="filter-button">
                                    <asp:LinkButton ID="btn_save" CssClass="btn save-btn fa-floppy-o" runat="server"
                                        OnClick="btn_save_Click" OnClientClick="javascript:return ValidateAll();" />
                                    <asp:LinkButton ID="btn_cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                        CausesValidation="false" OnClick="btn_cancel_Click" />
                                    <%-- Change the value to 1, it will throw the alert message 
                                    <asp:HiddenField ID="hdfValidation" Value="0" runat="server" />
                                    <asp:HiddenField ID="hdnLeaveCount" runat="server" />
                                    <asp:HiddenField ID="hdfOTHourType" runat="server" Value="0" />
                                    <asp:HiddenField ID="hdfOTDayType" runat="server" Value="0" />
                                    <asp:HiddenField ID="hdfFilter" runat="server" Value="0" />
                                </div>
                            </div>--%>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>

