111 lines
3.4 KiB
Plaintext
111 lines
3.4 KiB
Plaintext
<div class="row">
|
|
<div class="col-lg-12">
|
|
<ol class="breadcrumb">
|
|
<li><a href="<%= dashboard_path %>">Home</a></li>
|
|
<li class="active">
|
|
<a href="<%= crm_customers_path %>">Customer</a>
|
|
</li>
|
|
<a href="<%= new_crm_customer_path%>" class="btn btn-primary pull-right">
|
|
<i class="fa fa-plus-circle fa-lg"></i> Add Customer
|
|
</a>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-7">
|
|
|
|
<div class="main-box-body clearfix">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Company</th>
|
|
<th>Contact no</th>
|
|
<th>Email</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @crm_customers.each do |crm_customer| %>
|
|
<tr>
|
|
<td><%= crm_customer.name %></td>
|
|
<td><%= crm_customer.company %></td>
|
|
<td><%= crm_customer.contact_no %></td>
|
|
<td><%= crm_customer.email %></td>
|
|
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-5">
|
|
<%= simple_form_for crm_customers_path, :html => { :class => 'form-horizontal' } do |f| %>
|
|
|
|
<div class="form-group">
|
|
<%= f.input :name, :class => "form-control col-md-6" %>
|
|
</div>
|
|
<div class="form-group">
|
|
<%= f.input :company, :class => "form-control col-md-6" %>
|
|
</div>
|
|
<div class="form-group">
|
|
<%= f.input :contact_no, :class => "form-control col-md-6" %>
|
|
</div>
|
|
<div class="form-group">
|
|
<%= f.input :email, :class => "form-control col-md-6" %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="date_of_birth" class="col-md-6 control-label">Date Of Birth</label>
|
|
<%= f.text_field :date_of_birth,:class=>"form-control datepicker",:readonly =>true, :value => @date_of_birth%>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= f.select :membership_id, options_for_select(@membership.collect { |member|
|
|
[member["id"].name.titleize, member["id"].id] }, 1), {}, { id: 'countries_select' } %>
|
|
<select class="selectpicker form-control col-md-6" name="membership_id">
|
|
<option>Select Member Group</option>
|
|
<% @membership.each do |member| %>
|
|
<option value="<%= member["id"] %>">
|
|
<%= member["name"] %></option>
|
|
<%end %>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<%= f.input :membership_type, :class => "form-control col-md-6" %>
|
|
</div>
|
|
<div class="form-group">
|
|
<%= f.input :membership_authentication_code, :class => "form-control col-md-6" %>
|
|
|
|
</div>
|
|
<div class="form-group">
|
|
<%= f.button :submit, "Submit", :class => 'btn btn-primary' , :id => 'submit_account' %>
|
|
</div>
|
|
<%end%>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
if (jQuery().datepicker) {
|
|
$('.datepicker').datepicker({
|
|
format : 'dd-mm-yyyy',
|
|
autoclose: true
|
|
});
|
|
$('.datepicker').attr('ReadOnly','true');
|
|
$('.datepicker').css('cursor','pointer');
|
|
}
|
|
|
|
});
|
|
</script>
|