console.log('Starting new login timer');
// do not show a warning dialog if the inactivity timeout
- // occurs between entering a barcode and password.
+ // occurs during the login stage.
selfckStartTimer(!Boolean(selfCheckManager.patron));
}
selfCheckManager.init();
openils.Util.registerEnterHandler(dojo.byId('patron-login-username'), function(){checkLogin();});
openils.Util.registerEnterHandler(dojo.byId('patron-login-password'), function(){selfCheckMgr.loginPatron(dojo.byId('patron-login-username').value,dojo.byId('patron-login-password').value);});
+
+ // If we have a return-to address, start the login timer
+ // before the patron logs in, so we can revert back to
+ // our return-to page if the patron never logs in.
+ if (selfCheckManager.cgi.param('return-to')) {
+ selfckResetTimer();
+ }
}
);