New URL option return-to=http://example.org used for overriding the
default patron timeout / logout destination.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
* Logout the patron and return to the login page
*/
SelfCheckManager.prototype.logoutPatron = function(print) {
+
+ var return_url = this.cgi.param('return-to') || location.href;
+
progressDialog.show(true); // prevent patron from clicking logout link twice
if(print && this.checkouts.length) {
this.printSessionReceipt(
function() {
- location.href = location.href;
+ location.href = return_url;
}
);
} else {
- location.href = location.href;
+ location.href = return_url;
}
}