summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2017-09-12 12:16:21 -0400
committerChristopher Burger <burgerc@freeside.biz>2017-09-13 10:11:56 -0400
commitdcc0fd92717b25595ba7cd8a712e2eff10454291 (patch)
tree591496575fd76adc7190fd493b5fd2395a11637f
parent0a91d21fcf8ebeb12cd71230d79153c1fa0d82a3 (diff)
RT# 77504 - Documented javascript.
-rw-r--r--httemplate/elements/validate_password.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/httemplate/elements/validate_password.html b/httemplate/elements/validate_password.html
index 8c8cf4279..a8c06774e 100644
--- a/httemplate/elements/validate_password.html
+++ b/httemplate/elements/validate_password.html
@@ -26,7 +26,9 @@ function add_password_validation (fieldid, submitid) {
inputfield.onkeydown = function(e) {
var key;
if (window.event) { key = window.event.keyCode; }
- else { key = e.which; }
+ else { key = e.which; } // for ff browsers
+ // some browsers allow the enter key to submit a form even if the submit button is disabled
+ // below prevents enter key from submiting form if password has not been validated.
if (key == '13') {
var check = checkPasswordValidation();
return check;