Module: ODDB::View::SearchBarMethods

Included in:
Drugs::CenteredSearchForm, SelectSearchForm
Defined in:
src/view/searchbar.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) search_type(model, session = @session)



85
86
87
88
89
90
91
92
93
# File 'src/view/searchbar.rb', line 85

def search_type(model, session=@session)
  select = HtmlGrid::Select.new(:search_type, model, @session, self)
  if(@lookandfeel.respond_to?(:search_type_selection))
    select.valid_values = @lookandfeel.search_type_selection
  end
  select.set_attribute('onChange', 'this.form.onsubmit();')
  select.selected = @session.persistent_user_input(:search_type)
  select
end