core_user/form_user_selector

Provides the required functionality for an autocomplete element to select a user.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Methods

(static) processResults(selector, results) → {Array}

Source:

Process the results for auto complete elements.

Parameters:
Name Type Description
selector String

The selector of the auto complete element.

results Array

An array or results returned by {@see transport()}.

Returns:

New array of the selector options.

Type
Array

(static) transport(selector, query, callback, failure)

Source:

Load the list of users matching the query and render the selector labels for them.

Parameters:
Name Type Description
selector String

The selector of the auto complete element.

query String

The query string.

callback function

A callback function receiving an array of results.

failure function

A function to call in case of failure, receiving the error message.