mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 02:31:29 +00:00
validate password in prefs form
This commit is contained in:
@@ -3183,7 +3183,7 @@
|
|||||||
|
|
||||||
print "</form>";
|
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 "<table width=\"100%\" class=\"prefPrefsList\">";
|
||||||
print "<tr><td colspan='3'><h3>Authentication</h3></tr></td>";
|
print "<tr><td colspan='3'><h3>Authentication</h3></tr></td>";
|
||||||
@@ -3202,6 +3202,7 @@
|
|||||||
print "<input type=\"hidden\" name=\"op\" value=\"pref-prefs\">";
|
print "<input type=\"hidden\" name=\"op\" value=\"pref-prefs\">";
|
||||||
|
|
||||||
print "<p><input class=\"button\" type=\"submit\"
|
print "<p><input class=\"button\" type=\"submit\"
|
||||||
|
onclick=\"return validateNewPassword(this.form)\"
|
||||||
value=\"Change password\" name=\"subop\">";
|
value=\"Change password\" name=\"subop\">";
|
||||||
|
|
||||||
print "</form>";
|
print "</form>";
|
||||||
|
|||||||
12
prefs.js
12
prefs.js
@@ -1448,3 +1448,15 @@ function browserToggleExpand(id) {
|
|||||||
exception_error("browserExpand", e);
|
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;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user