693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
|
# File 'lib/ae_users.rb', line 693
def to_user_picker_tag(people, roles, options={})
options = options.stringify_keys
options = DEFAULT_USERPICKER_OPTIONS.merge(options)
add_default_name_and_id(options)
default = options["default"]
shim = tag("input", :type => "text", :id => "#{options["id"]}_shim", :value => default ? default.name : "",
:style => "width: 15em; display: inline; float: none;")
hidden = to_input_field_tag("hidden", options.update("value" => default ? default.id : ""))
url_params = options["auto_complete_url_params"].update(:people => people, :roles => roles,
:escape => false)
RAILS_DEFAULT_LOGGER.debug url_params.collect { |k, v| "#{k}: #{v}" }.join(", ")
options["auto_complete_url"] = @template_object.url_for(url_params)
shim + hidden + (options) + user_picker_js(options)
end
|