From 9480c7152279bd8d23aaa7f407a9bc6f9904e8e4 Mon Sep 17 00:00:00 2001 From: charitha Date: Mon, 16 May 2016 21:57:48 +0530 Subject: [PATCH] Fixed script error --- .../units/cdmf.unit.user.create/public/js/bottomJs.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.user.create/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.user.create/public/js/bottomJs.js index 32c7106125b..489eee0bc24 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.user.create/public/js/bottomJs.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.user.create/public/js/bottomJs.js @@ -254,7 +254,7 @@ $(document).ready(function () { if (data.errorMessage) { $(errorMsg).text("Selected user store prompted an error : " + data.errorMessage); $(errorMsgWrapper).removeClass("hidden"); - } else if (data["status"] == 201) { + } else if (data["statusCode"] == 201) { // Clearing user input fields. $("input#username").val(""); $("input#firstname").val(""); @@ -265,17 +265,17 @@ $(document).ready(function () { $("#user-create-form").addClass("hidden"); $("#user-created-msg").removeClass("hidden"); generateQRCode("#user-created-msg .qr-code"); - } else if (data["status"] == 409) { + } else if (data["statusCode"] == 409) { $(errorMsg).text(data["messageFromServer"]); $(errorMsgWrapper).removeClass("hidden"); - } else if (data["status"] == 500) { + } else if (data["statusCode"] == 500) { $(errorMsg).text("An unexpected error occurred at backend server. Please try again later."); $(errorMsgWrapper).removeClass("hidden"); } }, function (data) { - if (data["status"] == 409) { + if (data["statusCode"] == 409) { $(errorMsg).text("User : " + username + " already exists. Pick another username."); - } else if (data["status"] == 500) { + } else if (data["statusCode"] == 500) { $(errorMsg).text("An unexpected error occurred at backend server. Please try again later."); } else { $(errorMsg).text(data.errorMessage);