diff --git a/web/root/members/changepw.ssjs b/web/root/members/changepw.ssjs index b522dfcccdd7c2c966fdfc6b2a6e7f2eb981a7f2..9ceea1faa51be9dda6e0b532e96a9c735ed7d4f5 100644 --- a/web/root/members/changepw.ssjs +++ b/web/root/members/changepw.ssjs @@ -9,7 +9,7 @@ today = time(); var success=false; -template.backurl=http_request.header.referer; +var backurl=http_request.header.referer; template.resultmsg=''; @@ -24,31 +24,36 @@ newpw2 = newpw2.toString(); newpw2 = newpw2.toUpperCase(); if(oldpw == '') { - template.resultmsg="Old password is empty. Please enter old password." + template.resultmsg="Old password is empty. Please enter old password."; } else if(oldpw != user.security.password) { - template.resultmsg="Old password is not correct. Please Re-Enter." + template.resultmsg="Old password is not correct. Please Re-Enter."; } else if(newpw1 == '') { - template.resultmsg="New password cannot be blank! Please enter a new password."; + template.resultmsg="New password cannot be blank! Please enter a new password."; } else if(newpw1.length < 4) { - template.resultmsg="New Password must be a minimum of 4 characters. Please Re-Enter." + template.resultmsg="New Password must be a minimum of 4 characters. Please Re-Enter."; } else if(newpw1 != newpw2) { - template.resultmsg="New Passwords do not match. Please Re-Enter." + template.resultmsg="New Passwords do not match. Please Re-Enter."; } else { - template.resultmsg="Password Changed Successfully." + template.resultmsg="Password Changed Successfully."; user.security.password = newpw1; user.security.password_date = today; success=true; } +if(success) + template.reponse='Please <a href="/login.ssjs">Re-Login</a>.'; +else + template.response='<a href="' + backurl + '">Back to Change Password Page</a>'; + write_template("header.inc"); load("../web/lib/topnav_html.ssjs"); load("../web/lib/leftnav_html.ssjs"); diff --git a/web/templates/default/changepw.inc b/web/templates/default/changepw.inc index f44b5214c980adbae0a9c9ea9c09c2ff5b61976f..afeb2d5d50b3d15edf2b5cf2459bea43c229dba8 100644 --- a/web/templates/default/changepw.inc +++ b/web/templates/default/changepw.inc @@ -7,7 +7,7 @@ <td class="main" valign="top"><br /> <h1>@@resultmsg@@</h1> - @@JS:if(success)'Please <a href="/login.ssjs">Re-Login</a>.'; else'<a href="@@backurl@@">Back to Change Password Page</a>';@@ + @@response@@ <br />