Class: UserNameFields

UserNameFields()

Handles actions to display user name field for a given locale.

Constructor

new UserNameFields()

Source:

Members

baseURL :String

Uri to return the user name data.
Type:
  • String
Source:

formNode :String

Form node.
Type:
  • String
Source:

languageIdSelectNode :String

Language id select field.
Type:
  • String
Source:

userNameFieldsNode :String

HTML element containing the user name fields.
Type:
  • String
Source:

Methods

(protected) _cacheData()

Caches the values and maxLength attribute values from the current user name fields.
Source:

(protected) _createLoadingIndicator()

Inserts a loading indicator before the user name fields and hide the user name fields.
Source:

(protected) _getURL(languageId) → {Promise}

Returns a promise containing the URL to be used to retrieve the user name fields.
Parameters:
Name Type Description
languageId string The language id to be set on the URL.
Source:
Returns:
A promise to be resolved with the constructed URL
Type
Promise

(protected) _handleError(error)

Logs any error in the promise chain and removes the loading indicator.
Parameters:
Name Type Description
error Error The error object
Source:

(protected) _handleSelectChange(event)

Handles the change event when selecting a new language.
Parameters:
Name Type Description
event Event The event object.
Source:

(protected) _insertUserNameFields(markupText)

Replaces the HTML of the user name fields with the given HTML.
Parameters:
Name Type Description
markupText string The markup text used to create and insert the new user name fields.
Source:

(protected) _populateData()

Sets the values and maxLength attributes of the current user name fields with the data cached in this._cacheData.
Source:

(protected) _removeLoadingIndicator()

Removes the loading indicator and shows the user name fields.
Source:

(protected) _setUp()

Stores the current user name fields data and creates the loading indicator
Source:

attached()

Source:

created()

Source:

detached()

Source:

updateUserNameFields(languageId)

Updates the user name fields to display the appropriate fields for the given locale.
Parameters:
Name Type Description
languageId string The language id used when retrieving the user name fields.
Source: