diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/templates/role-listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/templates/role-listing.hbs
index 3234197ca9..c3e5541c18 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/templates/role-listing.hbs
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/templates/role-listing.hbs
@@ -5,13 +5,14 @@
-
{{roleName}} |
+ {{roleName}} |
{{#unequal adminRole roleName }}
- {{#if canEdit}}
-
+ {{#if canEdit}}
+
@@ -21,10 +22,12 @@
- Edit
-
-
+ Edit
+
+
@@ -34,18 +37,19 @@
- Edit Permission
-
- {{/if}}
- {{#if canRemove}}
-
+ Edit Permission
+
+ {{/if}}
+ {{#if canRemove}}
+
- Remove
-
- {{/if}}
+ Remove
+
+ {{/if}}
{{/unequal}}
|
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js
index f5e03d86c8..93c8a17d24 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js
@@ -31,8 +31,8 @@ function inputIsValid(regExp, inputString) {
/*
* Fix for the modal popup overlay disappear bug
*/
-$('.modal').on('hidden.bs.modal',function(){
- if($('.modal-backdrop').length == 2){
+$('.modal').on('hidden.bs.modal', function () {
+ if ($('.modal-backdrop').length == 2) {
$('.modal-backdrop')[0].remove()
}
});
@@ -92,7 +92,8 @@ $(document).ready(function () {
$(errorMsg).text("Your current password does not match with the provided value.");
$(errorMsgWrapper).removeClass("hidden");
} else {
- $(errorMsg).text("An unexpected error occurred. Please try again later.");
+ var response = JSON.parse(jqXHR.responseText).message;
+ $(errorMsg).text(response);
$(errorMsgWrapper).removeClass("hidden");
}
}