print "</form>";
- print "<form action=\"backend.php\" method=\"POST\">";
+ print "<form action=\"backend.php\" method=\"POST\" name=\"changePassForm\">";
print "<table width=\"100%\" class=\"prefPrefsList\">";
print "<tr><td colspan='3'><h3>Authentication</h3></tr></td>";
print "<input type=\"hidden\" name=\"op\" value=\"pref-prefs\">";
print "<p><input class=\"button\" type=\"submit\"
+ onclick=\"return validateNewPassword(this.form)\"
value=\"Change password\" name=\"subop\">";
print "</form>";
exception_error("browserExpand", e);
}
}
+
+function validateNewPassword(form) {
+ if (form.OLD_PASSWORD.value == "") {
+ alert("Current password cannot be blank");
+ return false;
+ }
+ if (form.NEW_PASSWORD.value == "") {
+ alert("New password cannot be blank");
+ return false;
+ }
+ return true;
+}