Update issues_form_hook_listener.rb

This commit is contained in:
2017-01-29 20:46:39 -05:00
committed by GitHub
parent 7e8511090d
commit f1f44d0048

View File

@@ -34,7 +34,8 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener
include_blank: true,
onchange: "$customerSelected;"
search_customer = f.autocomplete_field :customer_id, autocomplete_customer_name_customers_path, :id_element => '#issue_customer_id', :name => 'customer[name]'
search_customer = f.autocomplete_field :customer, autocomplete_customer_name_customers_path, :id_element => '#issue_customer_id', :selected => selected_customer
customer_id = f.hidden_field :customer_id, :id => "issue_customer_id"
# Generate the drop down list of quickbooks extimates
select_estimate = f.select :qbo_estimate_id, QboEstimate.all.pluck(:doc_number, :id).sort! {|x, y| y <=> x}, :selected => selected_estimate, include_blank: true
@@ -47,6 +48,6 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener
vehicle = f.select :vehicles_id, vehicles, :selected => selected_vehicle, include_blank: true
return "<p>#{search_customer}</p> <p>{select_customer}</p> <p>#{select_estimate}</p> <p>#{vehicle}</p>"
return "<p>#{search_customer}</p> <p>#{customer_id}</p> <p>#{select_estimate}</p> <p>#{vehicle}</p>"
end
end