From 31448ec07c00ad79b7f0fb25b6ccea9c4cc94253 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 13:14:33 +0530 Subject: [PATCH] Set redirection to policy listing page after creating policy. --- .../units/cdmf.unit.policy.create/create.hbs | 25 ++++--------------- .../public/js/policy-create.js | 2 ++ 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs index 1bc375a1905..5ef6bdedd5c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs @@ -38,23 +38,10 @@ @@ -82,9 +69,7 @@ + & Should be be 1-to-30 characters long.
@@ -285,7 +270,7 @@ {{#unless types}}

No compatible device types have been installed. - Install device types to add policies.

+ Install device types to add policies. {{/unless}}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js index ab7db6eeb45..a4d03689b64 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js @@ -428,6 +428,8 @@ var savePolicy = function (policy, isActive, serviceURL) { $(".add-policy").addClass("hidden"); $(".policy-naming").addClass("hidden"); $(".policy-message").removeClass("hidden"); + setTimeout(function(){}, 1000); + window.location.href = "/devicemgt/policies"; }, function (data) { }