mirror of https://tt-rss.org/git/tt-rss.git
validate password in prefs form
This commit is contained in:
parent
e5d758e3db
commit
64dc59764a
|
@ -3183,7 +3183,7 @@
|
|||
|
||||
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>";
|
||||
|
@ -3202,6 +3202,7 @@
|
|||
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>";
|
||||
|
|
12
prefs.js
12
prefs.js
|
@ -1448,3 +1448,15 @@ function browserToggleExpand(id) {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue