update customer

This commit is contained in:
Aung Myo
2017-06-09 12:00:46 +06:30
parent e2e8045d0f
commit ba9ebe12de
2 changed files with 4 additions and 6 deletions

View File

@@ -142,7 +142,7 @@ class Crm::CustomersController < BaseCrmController
else
format.html { render :edit }
format.html { render :index }
format.json { render json: @crm_customer.errors, status: :unprocessable_entity }
end

View File

@@ -72,9 +72,7 @@
<span class="patch_method"></span>
<input type="hidden" id="sale_id" name="sale_id" value="<%= @sale_id %>" />
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
<div class="form-group">
<%= f.button :submit, "Update Customer",:class => 'btn btn-primary btn-sm', :disabled =>'', :id => 'update_customer' %>
</div>
<div class="form-group">
<%= f.input :name, :class => "form-control col-md-6 name" %>
@@ -117,8 +115,8 @@
<div class="form-group">
<%= f.button :submit, "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %>
</div>
<%= f.button :submit, "Update",:class => 'btn btn-primary ', :disabled =>'', :id => 'update_customer' %>
</div>
<%end%>
</div>
</div>