From 64dc59764acc25f478651836d2a58cc4ed1b6b8a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 18 May 2006 06:19:40 +0100 Subject: [PATCH] validate password in prefs form --- backend.php | 3 ++- prefs.js | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/backend.php b/backend.php index 051a5f67..a1ddf5b8 100644 --- a/backend.php +++ b/backend.php @@ -3183,7 +3183,7 @@ print ""; - print "
"; + print ""; print ""; print ""; @@ -3202,6 +3202,7 @@ print ""; print "

"; print ""; diff --git a/prefs.js b/prefs.js index bc6e8667..2fc1a117 100644 --- a/prefs.js +++ b/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; +} -- 2.39.5

Authentication