Add blank option in search field for multiple search.
This commit is contained in:
parent
7c83a992d2
commit
82080f55a1
|
@ -44,6 +44,9 @@ class UniversalTablesController < ApplicationController
|
|||
if tc.make_categorizable
|
||||
select_values = tc.column_entries.distinct("text.#{I18n.locale.to_s}")
|
||||
form_field = "#{csrf_input}<select class=\"form-control\" name=\"q[#{field_key}]\">"
|
||||
if field_value.nil?
|
||||
select_values.insert(0, "")
|
||||
end
|
||||
select_values.each do |sv|
|
||||
if field_value && sv == field_value
|
||||
selected = " selected"
|
||||
|
@ -58,6 +61,9 @@ class UniversalTablesController < ApplicationController
|
|||
if tc.make_categorizable
|
||||
select_values = tc.column_entries.distinct(:number)
|
||||
form_field = "#{csrf_input}<select class=\"form-control\" name=\"q[#{field_key}]\">"
|
||||
if field_value.nil?
|
||||
select_values.insert(0, "")
|
||||
end
|
||||
select_values.each do |sv|
|
||||
if field_value && sv == field_value
|
||||
selected = " selected"
|
||||
|
|
Loading…
Reference in New Issue