| 123456789101112131415 |
- $("#error_explanation_remote_customer").html("")
- <% if @customer.errors.any? %>
- $('#error_explanation_remote_customer').removeClass('hidden');
- <% @customer.errors.values.each do |message| %>
- $("#error_explanation_remote_customer").append($("<li />").html("<%= message.first.to_s %>"));
- <% end %>
- <% else %>
- $('#sale_customer_id').append($('<option>', {
- value: <%= @customer.id %>,
- text : '<%= @customer.nick_name %>'
- }));
- $('#sale_customer_id').select2();
- $("#sale_customer_id").val(<%= @customer.id %>).trigger("change");
- $('#dialog').modal('toggle');
- <% end %>
|