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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <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_conv_type.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">Conversion Rate Type</span>
                        
                       <div class ="pull-right">
                            <asp:Button  CssClass="btn btn-info" ID ="btn_save" Text ="Save" runat="server"  ValidationGroup="save"/>
                           <asp:Button  CssClass="btn btn-info" ID ="btn_cancel" Text ="Back" runat="server" />
                            <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-danger alert-dismissable">
                                    <asp:label text="" id="lbl_err_msg" CssClass="msg" runat="server"></asp:label>
                                    
                                </div>
                            </div>
                        <div class ="row" style="padding-top:10px">
                            <div class ="col-md-1 col-md-offset-3">
                                <asp:HiddenField ID="hid_conv_type" runat ="server" />
                                <asp:Label runat ="server" Text ="Rate Type" CssClass ="control-label"></asp:Label>                                
                            </div>
                            <div class ="col-md-3" >
                                <asp:TextBox runat="server" CssClass="form-control" ID="txtuserconvType" ></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_userconvType" controltovalidate="txtuserconvType" errormessage="Rate Type Required!" />
                            </div>
                        </div>
                        <div class ="row" style="padding-top:10px">
                            <div class="col-md-1 col-md-offset-3">
                                <asp:Label runat ="server" Text ="Description" CssClass ="control-label"></asp:Label>                                
                            </div>
                                    <div class ="col-md-3" >
                                <asp:TextBox runat="server" CssClass="form-control" ID="txtdesc" ></asp:TextBox>
                                <asp:RequiredFieldValidator SetFocusOnError="true" ValidationGroup="save" runat="server" id="req_desc" controltovalidate="txtdesc" errormessage="Description Required!" />
                            </div>
                              
                            </div>
                        <div class ="row" style="padding-top:10px">
                            <div class="col-md-2 col-md-offset-4">
                             <asp:CheckBox runat="server" CssClass="checkbox" ID ="chk_enablesecurity" Text="Enable Security"/>

                             <%--<input type="checkbox" Class="checkbox" id="chk_enablesecurity" Text="Enable Security">--%>
                                  </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>
</asp:Content>
