new ValidateOnSaveModal(options)
Modal for confirming the saving of configuration, which will validate the config before it saves. Renders
the modal.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
ValidateOnSaveModalOptions |
- Source:
Members
-
className
-
Classes initially applied to the modal. Override if using Bootstrap 3
- Source:
-
template
-
Default template. Override if using Bootstrap 3
- Source:
Methods
-
handleError(model, xhr)
-
Handler called when saving the model fails. It will attempt to treat the responseText as JSON, and
check the validation property. If this exists, the cause of the validation failure will be displayed.
Otherwise the exception property will be printed. If the responseText is not JSON, a generic error message
will be displayedParameters:
Name Type Description modelBackbone.Model configModel
xhrjqxhr The jQuery AJAX object
- Source:
-
handleOk()
-
Handler called when the OK button is clicked. Saves the config model, calling handleSuccess if it
succeeds and handleError if it fails- Source:
-
handleSuccess()
-
Handler called when the model is saved successfully
- Source:
-
render()
-
Renders the modal
- Source: