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

<asp:Content ContentPlaceHolderID="BodyContentPH" runat="server">
    <div class="content-header">
        <h1 style="background-image: url('../dist/img/LeaveSettings.png'); background-repeat: no-repeat; padding-left: 35px">
            <asp:Label ID="lbl_Header" runat="server" Text="Leave Settings - Company"></asp:Label>
        </h1>
        <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
            <NodeStyle CssClass="active" />
        </asp:SiteMapPath>
    </div>
    <div class="content">
        <div id="myModal" class="modal modal-default fade" role="dialog">
            <div class="modal-dialog" style="min-width: 85%;">
                <!-- Modal content-->
                <div class="modal-content" style="margin-top: 50px">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" style="border-radius: 50px;">
                            &times;</button>
                        <h4 class="modal-title" style="padding-bottom: 10px">
                            <asp:Label ID="lblSelectEmployee" runat="server" Text="Select Employee"></asp:Label>
                        </h4>
                    </div>
                    <div class="modal-body" style="padding-top: 0px">
                        <iframe id="iframePopup" runat="server" scrolling="auto" width="100%" height="650px"
                            style="border-style: none"></iframe>
                    </div>
                    <div class="modal-footer" style="display: none">
                        <button type="button" class="btn btn-primary pull-right" data-dismiss="modal">
                            Close</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="inr-ftr">
            <div class="row">
                <div class="col-sm-12">
                    <div class="pull-right">
                        <h6>
                            <span style="color: Red">|</span><span style="padding-left: 10px; padding-right: 10px"><asp:Label
                                ID="lbl_IndicatesMandatoryFields" runat="server"></asp:Label>
                                (1 No.)</span>
                        </h6>
                    </div>
                </div>
                <div class="clearfix">
                </div>
            </div>
        </div>
        <div class="emp-filter">
            <asp:Label ID="lbl_Error" runat="server" ForeColor="Red"></asp:Label>
            <div class="form-horizontal">
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblCompany" runat="server"></asp:Label>
                            </div>
                            <div class="col-md-4">
                                <asp:DropDownList ID="ddlCompany" runat="server" AppendDataBoundItems="true" AutoPostBack="True"
                                    CssClass="form-control select2 Man-dat" OnSelectedIndexChanged="ddlCompany_SelectedIndexChanged">
                                    <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvCompany" runat="server" ControlToValidate="ddlCompany"
                                    ErrorMessage="RequiredFieldValidator" InitialValue="-Select-" Display="none"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="form-group" style="display: none">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_LeaveApproval" runat="server" CssClass="lbl">Leave Approval</asp:Label>
                            </div>
                            <div class="col-md-4">
                                <asp:RadioButton ID="rbtBoth" runat="server" GroupName="LeaveApproval" Text="Both First & Second Level Authority"
                                    Checked="true" />&nbsp;<asp:RadioButton ID="rbtEitherOne" runat="server" GroupName="LeaveApproval"
                                        Text="Either One" />
                            </div>
                        </div>
                        <div class="form-group" style="display: none">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_FirstLevelIntimation" runat="server" CssClass="lbl" Text="First Level Leave Intimation"></asp:Label>
                            </div>
                            <div class="col-md-4">
                                <asp:RadioButton ID="rbtFirstLevelYes" runat="server" GroupName="FirstLevelIntimation"
                                    Text="Yes" Checked="true" />
                                <asp:RadioButton ID="rbtFirstLevelNo" runat="server" GroupName="FirstLevelIntimation"
                                    Text="No" />
                            </div>
                        </div>
                        <div class="form-group" style="display: none">
                            <div class="col-md-2">
                                <asp:Label ID="lbl_SecondLevelIntimation" runat="server" CssClass="lbl" Text="Second Level Leave Intimation"></asp:Label>
                            </div>
                            <div class="col-md-4">
                                <asp:RadioButton ID="rbtSecondLevelYes" runat="server" GroupName="SecondLevelIntimation"
                                    Text="Yes" Checked="true" />
                                <asp:RadioButton ID="rbtSecondLevelNo" runat="server" GroupName="SecondLevelIntimation"
                                    Text="No" />
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblApprovalCC" runat="server" CssClass="lbl" Text="CC on Approval"></asp:Label>
                            </div>
                            <div class="col-md-4">
                                <div class="input-group input-group-sm">
                                    <asp:TextBox ID="txtApprovalCC" TextMode="MultiLine" runat="server" CssClass="form-control"
                                        Height="70px" OnKeyPress="return false" Style="resize: none;"></asp:TextBox>
                                    <span class="input-group-btn">
                                        <asp:Button ID="btnApprovalCC" runat="server" CssClass="btn save-btn" Text="CC..."
                                            data-toggle="modal" data-target="#myModal" Style="min-width: 45px" Height="70px"
                                            OnClientClick="javascript:return openPopupMailTo();" />
                                        <%--  <asp:Button ID="btnApprovalTO" runat="server" CssClass="btn save-btn" Text="To..."
                                            Style="min-width: 45px" Height="70px" OnClientClick="javascript:return openPopupMailTo();"
                                            data-toggle="modal" data-target="#myModal" />--%>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblDailyReportTO" runat="server" CssClass="lbl" Text="Daily Report TO"></asp:Label>
                            </div>
                            <div class="col-md-4">
                                <asp:TextBox ID="txtDailyReportTO" TextMode="MultiLine" runat="server" CssClass="form-control"
                                    Style="resize: none;"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2">
                                <asp:Label ID="lblDailyReportCC" runat="server" Text="Daily Report CC"></asp:Label>
                            </div>
                            <div class="col-md-4">
                                <asp:TextBox ID="txtDailyReportCC" TextMode="MultiLine" runat="server" CssClass="form-control"
                                    Style="resize: none;"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2">
                            </div>
                            <div class="col-md-4">
                                <div class="pull-right-button">
                                    <asp:LinkButton ID="butAdd" runat="server" OnClick="butAdd_Click" OnClientClick="if(Page_ClientValidate()) return confirm('Are you sure, to Add Leave Settings?');return false;"
                                        CssClass="btn save-btn fa-floppy-o" />
                                    <asp:LinkButton ID="btn_Cancel" CssClass="btn save-btn fa-angle-left" runat="server"
                                        CausesValidation="false" OnClick="btn_Cancel_Click" Visible="false" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        function openPopupMailTo() {
            document.getElementById('ctl00_BodyContentPH_iframePopup').src = "GetEmailIdsPopup.aspx";
            //        popupwindow('GetEmailIdsPopup.aspx', 'Test', 700, 500) 
            //window.open('GetEmailIdsPopup.aspx','Test','height=500,top=200,left=250,width=700');
            return false;
        }
        function popupwindow(url, title, w, h) {
            var left = (screen.width / 2) - (w / 2);
            var top = (screen.height / 2) - (h / 2);
            return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
        }
    </script>

</asp:Content>
