From 9fcf165523f599885dd2498df38248f5c4863c6b Mon Sep 17 00:00:00 2001 From: tlw72 Date: Mon, 10 Jan 2011 17:54:23 +0000 Subject: [PATCH] NIHVIVO-1565: additional required field validation --- .../edit/specific/user_retry_head.jsp | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/webapp/web/templates/edit/specific/user_retry_head.jsp b/webapp/web/templates/edit/specific/user_retry_head.jsp index 4b96c7b13..c82c09d44 100644 --- a/webapp/web/templates/edit/specific/user_retry_head.jsp +++ b/webapp/web/templates/edit/specific/user_retry_head.jsp @@ -10,6 +10,26 @@ } function validatePw(theForm) { + if (theForm.Username.value.length == 0 ) { + alert("Please enter a valid Email address."); + theForm.Username.focus(); + return false; + } + if (theForm.FirstName.value.length == 0 ) { + alert("Please enter a First Name."); + theForm.FirstName.focus(); + return false; + } + if (theForm.LastName.value.length == 0 ) { + alert("Please enter a Last Name."); + theForm.LastName.focus(); + return false; + } + if (theForm.Md5password.value.length == 0 ) { + alert("Please enter a password."); + theForm.Md5password.focus(); + return false; + } if (theForm.Md5password.value != theForm.passwordConfirmation.value) { alert("The passwords do not match."); theForm.Md5password.focus(); @@ -19,7 +39,8 @@ alert("Please enter a password between 6 and 12 characters long."); theForm.Md5password.focus(); return false; - } else { + } + else { return true; } }