In both the "Verify Credentials" menu and "Test Password" patron account
option, this change checks for the keypress of "Enter" and then executes
the cmd_verify routine.
Additionally, the password field is blanked after each attempt.
Signed-off-by: edoceo <code@edoceo.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
)
);
-
} catch(E) {
alert(E);
}
} else {
document.getElementById('name_prompt').focus();
}
+ document.getElementById('password_prompt').value = '';
},
false
);
document.getElementById('name_prompt').focus();
}
+ document.getElementById('password_prompt').addEventListener('keypress',function(e) {
+ if ( e.keyCode && (e.keyCode == 13 || e.keyCode == 77)) {
+ var x = document.createEvent('Event');
+ x.initEvent('command',true,false);
+ document.getElementById('cmd_verify').dispatchEvent(x);
+ }
+ });
+
} catch(E) {
alert(E);
}