Add handleRedirectResponse override function

This commit is contained in:
Samuel Georges 2017-02-04 19:14:26 +11:00
parent e323a1b98a
commit 7bcc31eef8
1 changed files with 11 additions and 3 deletions

View File

@ -198,7 +198,14 @@ if (window.jQuery === undefined)
/*
* Custom function, display a flash message to the user
*/
handleFlashMessage: function(message) {},
handleFlashMessage: function(message, type) {},
/*
* Custom function, redirect the browser to another location
*/
handleRedirectResponse: function(url) {
window.location.href = url
},
/*
* Custom function, handle any application specific response values
@ -246,8 +253,9 @@ if (window.jQuery === undefined)
isRedirect = true
}
if (isRedirect)
window.location.href = options.redirect
if (isRedirect) {
requestOptions.handleRedirectResponse(options.redirect)
}
/*
* Focus fields with errors