<div class="col-lg-4 col-md-4 col-sm-4">

    <%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>

    <span class="patch_method"></span>
    <%= f.hidden_field :id, :class => "form-control col-md-6 " %>

    <div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
      <%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
      <% flash.each do |name, msg| %>
         <% str="[\"#{msg['name']}\"]"
         str.gsub!('["', '')
         str.gsub!('"]', '') %>
         <span class="help-block" style="margin-top:-6px"><%= str %></span>
      <% end -%>
    </div>

    <div class="form-group">
      <label>Salutation :</label><br>
       <label>Mr</label>
        <%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr", :style=>"width: 30px"%>
        <label>Miss</label>
        <%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs", :style=>"width: 30px"%>
        <label>Mrs</label>
        <%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss", :style=>"width: 30px"%>
        <label>Mdm</label>
        <%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm", :style=>"width: 30px"%>    
   </div>
    
    <div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
      <%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
      <% flash.each do |name, msg| %>
         <% str="[\"#{msg['name']}\"]"
         str.gsub!('["', '')
         str.gsub!('"]', '') %>
         <span class="help-block" style="margin-top:-6px"><%= str %></span>
      <% end -%>
    </div>

    <div class="form-group">
      <label>Gender :</label><br>
      <label>Male</label>
      <%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%>
        <label>Female</label>
        <%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%>
   </div>
    
    <div class="form-group">
      <%= f.input :nrc_no, :class => "form-control nrc_no" %>
    </div>

    <div class="form-group">
      <%= f.input :company, :class => "form-control col-md-6 company",:required => true%>
      
      <%  flash.each do |name, msg| %>
        <% str="[\"#{msg['company']}\"]"
         str.gsub!('["', '')
         str.gsub!('"]', '') %>
        <span class="help-block" style="margin-top:-6px"><%= str %></span>
      <% end -%>
    </div>
    <div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
      <%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
      
      <%  flash.each do |name, msg| %>
        <% str="[\"#{msg['contact_no']}\"]"
         str.gsub!('["', '')
         str.gsub!('"]', '') %>
        <span class="help-block" style="margin-top:-6px"><%= str %></span>
      <% end -%>
    </div>

    <div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
      <%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
   
      <% flash.each do |name, msg| %>
         <% str="[\"#{msg['contact_no']}\"]"
            str.gsub!('["', '')
            str.gsub!('"]', '') %>
         <span class="help-block" style="margin-top:-6px"><%= str %></span>
      <% end -%>
    </div>

    <div class="form-group">
      <%= f.input :address, :class => "form-control col-md-6 address" %>
    </div>

    <div class="form-group">
    <label>Sr.No</label>
     <input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true">
   </div>

    <div class="form-group">
    <label>Date Of Birth</label>
     <%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
   </div>

   <div class="form-group">
   <label>Select Member Group</label>
        <select class="selectpicker form-control col-md-12" name="member_group_id"  style="height: 40px" >
          <option value="">Select Membership Group</option>
            <%  Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
               <option value="<%= member.value %>">
              <%= member.name %></option>
            <%end %>
          </select> 
           
  </div>
  

  <div class="form-group">
        <%= f.button :submit, "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %>
        <%= f.button :submit, "Update",:class => 'btn btn-primary ', :disabled =>'', :id => 'update_customer' %>
        <%= f.button :button, "Reset",:class => 'btn btn-danger ', :id => 'reset' %>
  </div>
 <%end%>
</div>