Update issues_form_hook_listener.rb

Added onchange listener to customer form field
This commit is contained in:
2020-03-26 12:50:32 -04:00
parent 0d0f808305
commit f43020b864

View File

@@ -35,7 +35,13 @@ class IssuesFormHookListener < Redmine::Hook::ViewListener
# Load customer information
customer = Customer.find_by_id(selected_customer) if selected_customer
search_customer = f.autocomplete_field :customer, autocomplete_customer_name_customers_path, :selected => selected_customer, :update_elements => {:id => '#issue_customer_id', :value => '#issue_customer'}
search_customer = f.autocomplete_field :customer,
autocomplete_customer_name_customers_path,
:selected => selected_customer,
:update_elements => { :id => '#issue_customer_id', :value => '#issue_customer' }
:onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)"
customer_id = f.hidden_field :customer_id, :id => "issue_customer_id"
if context[:issue].customer