Module: UcbRails::LpsTypeaheadHelper

Defined in:
app/helpers/ucb_rails/lps_typeahead_helper.rb

Overview

Helper class that produces a person search widget than includes typeahead and CalNet lookup functionality.

Instance Method Summary collapse

Instance Method Details

#lps_typeahead_search_field(options = {}) ⇒ Object

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :name (Symbol) — default: :person_search

    the name of the <input> field

  • :label (String) — default: 'User'

    the text of the field label

  • :required (Boolean) — default: false

    is the field required

  • :value (String) — default: params[:name]

    the value of the field

  • :placeholder (String) — default: 'Type name to search'

    the html placeholder attribute

  • :hint (String) — default: 'Click icon to search CalNet'

    hint text

  • :result_link_text (String) — default: 'Select'

    the text of the link button in search results

  • :result_link_class (String) — default: 'lps-typeahead-item'

    class to be added the the results link

  • :uid_dom_id (String) — default: 'uid'

    the dom-id of the (hidden) uid <input>

  • :typeahead_url (String) — default: '/ucb_rails/admin/users/typeahead_search'

    the typeahead url

  • :ldap_search_url (String) — default: '/ucb_rails/ldap_person_search/

    the ldap search rul

  • :ldap_search (Boolean) — default: true

    include the icon/markup for ldap searches



17
18
19
# File 'app/helpers/ucb_rails/lps_typeahead_helper.rb', line 17

def lps_typeahead_search_field(options={})
  UcbRails::Renderer::LpsTypeaheadSearchField.new(self, options).html
end