diff --git a/ui/scripts/cloud.core.account.js b/ui/scripts/cloud.core.account.js index 03d5476c413..6325c3b14c1 100644 --- a/ui/scripts/cloud.core.account.js +++ b/ui/scripts/cloud.core.account.js @@ -929,7 +929,13 @@ function doChangePassword($actionLink, $subgridItem) { data: createURL("command=updateUser&id="+id+"&password="+password), dataType: "json", success: function(json) { - $subgridItem.find("#after_action_info").text("Change password action succeeded."); + var label = $actionLink.data("label"); + var label2; + if(label in dictionary) + label2 = dictionary[label]; + else + label2 = label; + $subgridItem.find("#after_action_info").text(label2 + " - " + g_dictionary["label.succeeded"]); $subgridItem.find("#after_action_info_container").removeClass("error").addClass("success").show(); } }); diff --git a/ui/scripts/cloud.core.js b/ui/scripts/cloud.core.js index b310cec9b30..c71287665ee 100644 --- a/ui/scripts/cloud.core.js +++ b/ui/scripts/cloud.core.js @@ -287,11 +287,12 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, $subgridItem) { $("body").stopTime(timerKey); $spinningWheel.hide(); if (result.jobstatus == 1) { // Succeeded - $subgridItem.find("#after_action_info").text(label2 + " action succeeded."); - $subgridItem.find("#after_action_info_container").removeClass("error").addClass("success").show(); + $subgridItem.find("#after_action_info").text(label2 + " - " + g_dictionary["label.succeeded"]); + $subgridItem.find("#after_action_info_container").removeClass("error").addClass("success").show(); afterActionSeccessFn(json, id, $subgridItem); } else if (result.jobstatus == 2) { // Failed - $subgridItem.find("#after_action_info").text(label2 + " action failed. Reason: " + fromdb(result.jobresult.errortext)); + var errorMsg = label2 + " - " + g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode); + $subgridItem.find("#after_action_info").text(errorMsg); $subgridItem.find("#after_action_info_container").removeClass("success").addClass("error").show(); } } @@ -324,8 +325,8 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, $subgridItem) { async: false, success: function(json) { $spinningWheel.hide(); - $subgridItem.find("#after_action_info").text(label2 + " action succeeded."); - $subgridItem.find("#after_action_info_container").removeClass("error").addClass("success").show(); + $subgridItem.find("#after_action_info").text(label2 + " - " + g_dictionary["label.succeeded"]); + $subgridItem.find("#after_action_info_container").removeClass("error").addClass("success").show(); afterActionSeccessFn(json, id, $subgridItem); }, error: function(XMLHttpResponse) {