Edit Customer form
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
@import "BSBMaterial/style";
|
@import "BSBMaterial/style";
|
||||||
@import "BSBMaterial/themes/all-themes";
|
@import "BSBMaterial/themes/all-themes";
|
||||||
@import "reset";
|
@import "reset";
|
||||||
|
@import "fileinput.min";
|
||||||
|
|
||||||
|
|
||||||
/* Reset */
|
/* Reset */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
json.extract! @crm_customer, :id, :name, :company, :contact_no, :email, :date_of_birth,
|
json.extract! @crm_customer, :id, :name, :company, :contact_no, :email, :date_of_birth,
|
||||||
:membership_id, :membership_type, :membership_authentication_code,
|
:membership_id, :membership_type, :membership_authentication_code,
|
||||||
:salutation, :gender,:nrc_no,:address,:card_no, :paypar_account_no, :customer_type, :tax_profiles
|
:salutation, :gender,:nrc_no,:address,:card_no, :paypar_account_no, :customer_type, :image_path, :tax_profiles
|
||||||
json.url crm_customer_url(@crm_customer, format: :json)
|
json.url crm_customer_url(@crm_customer, format: :json)
|
||||||
@@ -205,6 +205,9 @@ $(document).on('click',".customer_tr",function(){
|
|||||||
$('#paypar_account_no').val(data.paypar_account_no);
|
$('#paypar_account_no').val(data.paypar_account_no);
|
||||||
$('#customer_address').val(data.address);
|
$('#customer_address').val(data.address);
|
||||||
$('#customer_date_of_birth').val(data.date_of_birth);
|
$('#customer_date_of_birth').val(data.date_of_birth);
|
||||||
|
if(data.image_path.url!=undefined && data.image_path.url!=null){
|
||||||
|
$('.menu-item-img .img-thumbnail').attr('src',data.image_path.url);
|
||||||
|
}
|
||||||
$('#customer_membership_type').val(data.membership_type);
|
$('#customer_membership_type').val(data.membership_type);
|
||||||
$('.selectpicker > option[value="'+data.membership_type+'"]').attr('selected','selected');
|
$('.selectpicker > option[value="'+data.membership_type+'"]').attr('selected','selected');
|
||||||
if (data.gender == 'Male') {
|
if (data.gender == 'Male') {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
json.extract! @crm_customer, :id, :name, :company, :contact_no, :email, :date_of_birth,
|
json.extract! @crm_customer, :id, :name, :company, :contact_no, :email, :date_of_birth,
|
||||||
:membership_id, :membership_type, :membership_authentication_code,
|
:membership_id, :membership_type, :membership_authentication_code,
|
||||||
:salutation, :gender,:nrc_no,:address,:card_no, :paypar_account_no, :customer_type, :tax_profiles
|
:salutation, :gender,:nrc_no,:address,:card_no, :paypar_account_no, :customer_type, :image_path, :tax_profiles
|
||||||
json.url crm_customer_url(@crm_customer, format: :json)
|
json.url crm_customer_url(@crm_customer, format: :json)
|
||||||
|
|||||||
@@ -207,6 +207,21 @@
|
|||||||
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label><%= t("views.right_panel.detail.customer_photo") %></label>
|
||||||
|
<div class="panel padding-10">
|
||||||
|
<div class="menu-item-img">
|
||||||
|
<% if f.object.image_path? %>
|
||||||
|
<p><%= f.object.name %></p>
|
||||||
|
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||||
|
<% else %>
|
||||||
|
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label><%= t("views.right_panel.detail.select_customer_type") %></label>
|
<label><%= t("views.right_panel.detail.select_customer_type") %></label>
|
||||||
<select class="form-control col-md-12" id="customer_type" name="customer[customer_type]" style="height: 40px" >
|
<select class="form-control col-md-12" id="customer_type" name="customer[customer_type]" style="height: 40px" >
|
||||||
|
|||||||
Reference in New Issue
Block a user