Patch up the client remove ui

This commit is contained in:
Johannes Zellner
2016-06-07 13:12:53 +02:00
parent 9eabc9d266
commit ffd552583c
3 changed files with 22 additions and 5 deletions

View File

@@ -210,7 +210,7 @@ angular.module('Application').controller('AccountController', ['$scope', '$locat
client: {},
show: function (client) {
$scope.clientRemove.busy = true;
$scope.clientRemove.busy = false;
$scope.clientRemove.client = client;
$('#clientRemoveModal').modal('show');
},
@@ -218,9 +218,16 @@ angular.module('Application').controller('AccountController', ['$scope', '$locat
submit: function () {
$scope.clientRemove.busy = true;
$scope.clientRemove.busy = false;
Client.delOAuthClient($scope.clientRemove.client.id, function (error) {
if (error) console.error(error);
$('#clientRemoveModal').modal('hide');
$scope.clientRemove.busy = false;
$scope.clientRemove.client = {};
refresh();
$('#clientRemoveModal').modal('hide');
});
}
};