Skip to content
Snippets Groups Projects
Commit c20f922f authored by runemaster's avatar runemaster
Browse files

Fix nested tags to comply with new template.ssjs

parent d97ebe73
Branches
Tags
No related merge requests found
...@@ -9,7 +9,7 @@ today = time(); ...@@ -9,7 +9,7 @@ today = time();
var success=false; var success=false;
template.backurl=http_request.header.referer; var backurl=http_request.header.referer;
template.resultmsg=''; template.resultmsg='';
...@@ -24,31 +24,36 @@ newpw2 = newpw2.toString(); ...@@ -24,31 +24,36 @@ newpw2 = newpw2.toString();
newpw2 = newpw2.toUpperCase(); newpw2 = newpw2.toUpperCase();
if(oldpw == '') { if(oldpw == '') {
template.resultmsg="Old password is empty. Please enter old password." template.resultmsg="Old password is empty. Please enter old password.";
} }
else else
if(oldpw != user.security.password) { 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 else
if(newpw1 == '') { 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 else
if(newpw1.length < 4) { 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 else
if(newpw1 != newpw2) { if(newpw1 != newpw2) {
template.resultmsg="New Passwords do not match. Please Re-Enter." template.resultmsg="New Passwords do not match. Please Re-Enter.";
} }
else { else {
template.resultmsg="Password Changed Successfully." template.resultmsg="Password Changed Successfully.";
user.security.password = newpw1; user.security.password = newpw1;
user.security.password_date = today; user.security.password_date = today;
success=true; 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"); write_template("header.inc");
load("../web/lib/topnav_html.ssjs"); load("../web/lib/topnav_html.ssjs");
load("../web/lib/leftnav_html.ssjs"); load("../web/lib/leftnav_html.ssjs");
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<td class="main" valign="top"><br /> <td class="main" valign="top"><br />
<h1>@@resultmsg@@</h1> <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 /> <br />
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment