new CommunityWidget(options)
Widget for configuring an IDOL Community server. As AciWidget, but allows the configuration of a repository
to use for authentication
Parameters:
| Name | Type | Description |
|---|---|---|
options |
CommunityWidgetOptions | Options for the widget |
- Source:
Extends
Members
-
aciTemplate :module:settings/js/widgets/aci-widget.AciWidget~AciTemplate
-
Base template for the widget. Override if using Bootstrap 3
Type:
- Inherited From:
- Source:
-
className :string
-
Classes applied to the widget. Override if using Bootstrap 3
Type:
- string
- Inherited From:
- Default Value:
-
- Widget.prototype.className + ' settings-servergroup control-group form-horizontal'
- Source:
-
controlGroupClass
-
Class applied to control groups. Set to 'form-group' if using Bootstrap 3
- Inherited From:
- Default Value:
-
- control-group
- Source:
-
errorClass
-
Class used to indicate failed validation. Set to 'has-error' if using Bootstrap 3
- Inherited From:
- Default Value:
-
- error
- Source:
-
formControlClass
-
Class applied to form controls. Set to 'form-control' if using Bootstrap 3
- Inherited From:
- Default Value:
-
- ''
- Source:
-
serverTemplate :module:settings/js/server-widget.ServerWidget~ServerWidgetTemplate
-
Base template for the widget. Override if using Bootstrap 3
Type:
- Inherited From:
- Source:
-
successClass
-
Class used to indicate successful validation. Set to 'has-success' if using Bootstrap 3
- Inherited From:
- Default Value:
-
- success
- Source:
-
widgetTemplate :module:settings/js/widget.Widget~WidgetTemplate
-
Base template for the widget. Override if using Bootstrap 3
Type:
- Inherited From:
- Source:
Methods
-
<protected> displayValidationMessage(isEqual, response)
-
If isEqual is true displays a message showing the result of a validation. Otherwise clears the
validation stateParameters:
Name Type Description isEqualboolean True if the config is equal to the config received from the server; false otherwise
responseValidationResponse The repsonse from the server
- Inherited From:
- Source:
-
getConfig() → {AciWidgetConfig}
-
Returns the configuration associated with this widget
- Inherited From:
- Source:
Returns:
The current configuration represented by the widget
- Type
- AciWidgetConfig
-
getName() → {string}
-
Gets the name for the widget
- Inherited From:
- Deprecated:
-
- Users of this class do not need to call this
- Source:
Returns:
this.serverName, or this.configItem if serverName is undefined
- Type
- string
-
getValidationFailureMessage(response) → {string}
-
Generates a message indicating that validation was unsuccessful
Parameters:
Name Type Description responseValidationResponse The response from the server
- Inherited From:
- Source:
Returns:
A message indicating validation was unsuccessful
- Type
- string
-
getValidationSuccessMessage(response) → {string}
-
Generates a message indicating that validation was successful
Parameters:
Name Type Description responseValidationResponse The response from the server
- Inherited From:
- Source:
Returns:
A message indicating validation was successful
- Type
- string
-
handleInputChange()
-
Handler for change events on any inputs in the widget. Calls hideValidationInfo and
setValidationFormatting- Inherited From:
- Source:
-
handleValidation()
-
Handles the results of server side validation
- Inherited From:
- Source:
-
hideValidationInfo()
-
Removes validation information as defined in Widget and also hides the connection state
- Inherited From:
- Source:
-
render()
-
Renders the widget by first calling ServerWidget#render
and then adding the necessary form controls- Inherited From:
- Source:
-
setValidationFormatting(state)
-
Removes this.successClass and this.errorClass from elements in the widget with this.controlGroupClass.
If state === 'clear', remove successClass and errorClass from this.$el. Otherwise adds the given class
and removes the other classParameters:
Name Type Description statestring clear to remove classes, otherwise this.successClass or this.errorClass to add that
class and remove the other class- Inherited From:
- Source:
-
shouldValidate() → {boolean}
-
Returns true as all ServerWidgets should validate
- Inherited From:
- Source:
Returns:
true
- Type
- boolean
-
triggerValidation()
-
Triggers validation when the test connection button is pressed
- Inherited From:
- Source:
Fires:
- event:validate Event indicating that validation should take place
-
updateConfig(config)
-
Populates the widget with the given config
Parameters:
Name Type Description configAciWidgetConfig The new config for the widget
- Inherited From:
- Source:
-
<protected> updateInputValidation($input, isValid, message)
-
Updates the formatting of the given input
If isValid is true, removes errorClass from the input and hides elements with the class
settings-client-validationIf isValid is false, adds errorClass to the input and shows elements with the class
settings-client-validationParameters:
Name Type Description $inputjQuery The input to apply the classes to
isValidboolean True if the input is valid; false otherwise
messagestring Validation message to display
- Inherited From:
- Source:
-
validateInputs() → {boolean}
-
Validates the widget and applies formatting if necessary
- Inherited From:
- Source:
Returns:
False if the host is blank; true otherwise
- Type
- boolean