revert owner transfer flow to avoid too many action buttons

This commit is contained in:
Johannes Zellner
2021-01-19 22:26:43 +01:00
parent 8fa890e0d0
commit 43c0cd034c
2 changed files with 14 additions and 8 deletions

View File

@@ -56,11 +56,11 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.transferOwnership = {
busy: false,
error: null,
userInfo: {},
selectedUser: null,
show: function (userInfo) {
show: function () {
$scope.transferOwnership.error = null;
$scope.transferOwnership.userInfo = userInfo;
$scope.transferOwnership.selectedUser = null;
$('#transferOwnershipModal').modal('show');
},
@@ -68,7 +68,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
submit: function () {
$scope.transferOwnership.busy = true;
Client.changeOwnership($scope.transferOwnership.userInfo.id, function (error) {
Client.changeOwnership($scope.transferOwnership.selectedUser.id, function (error) {
$scope.transferOwnership.busy = false;
if (error) {