mirror of https://github.com/apache/cloudstack.git
CS-15313: Error handling for account section
This fixes an issue where an error is not displayed when entering an invalid account name. Original patch by: Pranav Saxena <pranav.saxena@citrix.com> reviewed-by: Brian Federle <brian.federle@citrix.com>
This commit is contained in:
parent
b70bc92f46
commit
5fafb0e5e5
|
|
@ -177,7 +177,7 @@
|
|||
action: function(args) {
|
||||
var array1 = [];
|
||||
array1.push("&username=" + todb(args.data.username));
|
||||
|
||||
var errorMsg = "";
|
||||
var password = args.data.password;
|
||||
if (md5Hashed)
|
||||
password = $.md5(password);
|
||||
|
|
@ -266,6 +266,7 @@
|
|||
edit: {
|
||||
label: 'message.edit.account',
|
||||
action: function(args) {
|
||||
var errorMsg = "";
|
||||
var accountObj = args.context.accounts[0];
|
||||
|
||||
var array1 = [];
|
||||
|
|
@ -277,7 +278,12 @@
|
|||
async: false,
|
||||
success: function(json) {
|
||||
accountObj = json.updateaccountresponse.account;
|
||||
},
|
||||
error: function(json) {
|
||||
errorMsg = parseXMLHttpResponse(json);
|
||||
args.response.error(errorMsg);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
|
|
@ -325,6 +331,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
if(errorMsg == "")
|
||||
args.response.success({data: accountObj});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue