<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"
    CodeBehind="FND_FLEX_VALUES_detail.aspx.cs" Inherits="HRMS.GL.ChartOfAccount.FND_FLEX_VALUES_detail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="row">
        <div class="col-lg-12">
            <!--breadcrumbs start -->
            <ul class="breadcrumb">
                <li><a href="#" id="home" runat="server"><i class="fa fa-home"></i>Home</a></li>
                <li><a href="#" id="coa_url" runat="server">Structure</a></li>
            </ul>
            <!--breadcrumbs end -->
        </div>
    </div>
    <asp:ScriptManager ID="scriptManager" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel runat="server" ID="upMain" UpdateMode="Conditional" ChildrenAsTriggers="true">
        <ContentTemplate>
            <script type="text/javascript">
                function clearTextBox() {
                    var elements = document.getElementsByTagName("input");
                    for (var ii = 0; ii < elements.length; ii++) {
                        if (elements[ii].type == "text") {
                            elements[ii].value = "";
                        }
                    }
                    document.getElementById('<%=hid_flx_value_id.ClientID %>').value = "";

                }
            </script>
            <div class="main-panel">
                <div class="row">
                    <div class="col-md-12">
                        <section class="panel">
                    <header class="panel-heading" style="padding-bottom:30px">
                           <span class="label label-primary">Values</span>
                        
                        <div class="pull-right">
                            <asp:button text="Save" CssClass="btn btn-info" ID="btn_save" runat="server"  ValidationGroup="save"
                                onclick="btn_save_Click" />
                            <asp:button text="Back" CssClass="btn btn-info" ID="btn_cancel" 
                                runat="server" onclick="btn_cancel_Click" />

                                  <input type="button" value="Clear" class="btn btn-info" onclick="clearTextBox()" />
                        </div>
                    </header>
                    <div class="panel-body">
                         <div class="span6">
                                <div id="divmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                    <asp:label text="" ID="lbl_msg" CssClass="msg" runat="server"></asp:label>
                                </div>
                            </div>

                            <div class="span6">
                                <div id="diverrmessage" runat="server" visible="false" class="alert alert-info alert-dismissable">
                                    <asp:label text="" id="lbl_err_msg" CssClass="msg" runat="server"></asp:label>
                                </div>
                            </div>


                            <div class="row" style="padding-top:10px">
                             <asp:HiddenField ID="hid_flx_value_id" runat ="server" />
                                <label class="control-label col-md-2">Value</label>
                                <div class="col-md-3">
                                    <asp:textbox CssClass="form-control" ID="txt_val" runat="server"></asp:textbox>
                                    <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_val" controltovalidate="txt_val" errormessage="Value Required!" />
                                    

                                </div>

                                <label class="control-label col-md-2">Translated Value</label>
                                <div class="col-md-3">
                                    <asp:textbox CssClass="form-control" ID="txt_flx_val_mean" runat="server"></asp:textbox>
                                    <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_flx_val_mean" controltovalidate="txt_flx_val_mean" errormessage="Translated Value Required!" />
                                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txt_val" ControlToValidate="txt_flx_val_mean" Display="Dynamic" ErrorMessage="Translated value should be equal to Value" ForeColor="Red" Operator="Equal" ValidationGroup="save"></asp:CompareValidator>
                                </div>

                            </div>

                            <div class="row" style="padding-top:10px">
                                 <label class="control-label col-md-2">Group</label>
                                <div class="col-md-3">
                                    <asp:textbox CssClass="form-control" ID="txt_str_her_name" runat="server"></asp:textbox>
                                </div>

                                  <label class="control-label col-md-2">Parent Account</label>
                                <div class="col-md-4">
                                    <div class="input-group">
                                        <asp:HiddenField ID="hid_parent_acount" runat="server" />
                                         <asp:textbox Visible="false" CssClass="form-control" ID="txt_parent_account" runat="server"></asp:textbox>
                                          <span class="input-group-btn">
                                                            <button id="btn_lov_parent_acc" Visible="false" type="button" runat="server" class="btn btn-white" onserverclick="btn_lov_parent_acc_Click">
                                                            <i class="fa fa-search"></i></button>
                                                          </span>

                                                         
                                    </div>
                                    <asp:DropDownList ID="ddl_pr_acc" runat="server" CssClass="form-control select2"></asp:DropDownList>
                                </div>

                            </div>


                             <div class="row" style="padding-top:10px">
                                <label class="control-label col-md-2">Level</label>
                                <div class="col-md-3">
                                    <asp:textbox CssClass="form-control" ID="txt_her_lvl" runat="server"></asp:textbox>
                                    <%--<asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_her_lvl" controltovalidate="txt_her_lvl" errormessage="Level Required!" />--%>
                                </div>

                                <label class="control-label col-md-2">Account Type</label>
                                <div class="col-md-3">
                                    <asp:dropdownlist ID="ddl_acc_type" CssClass="form-control" runat="server"></asp:dropdownlist>
                                </div>
                            </div>
 

                            <div class="row" style="padding-top:10px">
                                <label class="control-label col-md-2">Description</label>
                                <div class="col-md-8">
                                    <asp:textbox CssClass="form-control" ID="txt_desc" runat="server"></asp:textbox>
                                    <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_desc" controltovalidate="txt_desc" errormessage="Description Required!" />
                                </div>
                            </div>

                             <div class="row" style="padding-top:10px">
                                  <%--  <label class="control-label col-md-1">Parent</label>--%>
                               
                            </div>

                             <div class="row">
                              <div class="col-md-2 col-md-offset-2">
                                    <asp:checkbox ID="chk_sum_flg" text="Parent" CssClass="checkbox" runat="server" />
                                </div>

                                <%--<label class="control-label col-md-2">Allow Budgeting</label>--%>
                                <div class="col-md-2">
                                   <asp:checkbox ID="chk_allow_budg" text="Allow Budgeting" CssClass="checkbox" runat="server" />
                                </div>

                                <%--<label class="control-label col-md-1">Allow Posting</label>--%>
                                <div class="col-md-2">
                                    <asp:checkbox ID="chk_allow_post" text="Allow Posting" CssClass="checkbox" runat="server" />
                                </div>
                            </div>

                            <div class="row">
                            <div class="col-md-2 col-md-offset-2">
                                   <asp:checkbox ID="chk_reconcile" text="Reconcile" CssClass="checkbox" runat="server" />
                                </div>

                                <div class="col-md-3">
                                   <asp:checkbox ID="chk_thrd_prty_acc" text="Third Party Control Account" CssClass="checkbox" runat="server" />
                                </div>

                                
                            </div>

                           

                            <hr />
                            <div class="row" style="padding-top:10px">
                                 <label class="control-label col-md-2">From Date</label>
                                <div class="col-md-3">
                                    <asp:textbox CssClass="form-control form_datetime" ID="txt_fromdate" runat="server"></asp:textbox>
                                </div>

                                  <label class="control-label col-md-1">To Date</label>
                                <div class="col-md-3">
                                    <asp:textbox CssClass="form-control form_datetime" ID="txt_todate" runat="server"></asp:textbox>
                                </div>

                            </div>


                           


                             <asp:Repeater ID="add_info" runat="server">
                                <HeaderTemplate><header class="panel-heading">Additional Information</header><br /></HeaderTemplate>
                                <ItemTemplate>
                                    <div class="row">
                                        <asp:Label ID="r_lbl" CssClass="control-label col-md-2" runat="server" Text='<%#Eval("PROMPT") %>'></asp:Label>
                                        <div class="col-md-3">
                                            <asp:TextBox ID="txt_r_value" runat="server" CssClass="form-control" Text='<%#Eval("value") %>' placeholder='<%#Eval("PROMPT") %>'></asp:TextBox>
                                            <asp:HiddenField ID="hid_field_name" runat="server" Value='<%#Eval("col_name") %>' />
                                        </div>
                                    </div>
                                </ItemTemplate>
                            </asp:Repeater>
                            
                    </div>

                   

                </section>
                    </div>
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btn_save" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
          <script src="../../ThemeScrips/jquery.min.js"></script>
    <link href="../../ThemeScrips/select2.min.css"
        rel="stylesheet" />
    <script src="../../ThemeScrips/select2.min.js"></script>
    <script>
        $('.select2').select2();
    </script>
</asp:Content>
