From 586a21035c54a488c577606414801566b9d8251f Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 1 Apr 2011 00:23:07 +0200 Subject: [PATCH] Fixes bug #527: Users with empty names/passwords Sunstone will warn the user that both fields need to be filled in. --- src/sunstone/public/js/plugins/users-tab.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js index 9e0ff4cfb3..f5470aaed8 100644 --- a/src/sunstone/public/js/plugins/users-tab.js +++ b/src/sunstone/public/js/plugins/users-tab.js @@ -196,6 +196,11 @@ function setupCreateUserDialog(){ $('#create_user_form').submit(function(){ var user_name=$('#username',this).val(); var user_password=$('#pass',this).val(); + if (!user_name.length && !user_password.length){ + notifyError("User name and password must be filled in"); + return false; + } + var user_json = { "user" : { "name" : user_name, "password" : user_password }