mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 16:47:45 -02:30
change async loading order for form
This commit is contained in:
@@ -210,8 +210,6 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
});
|
||||
});
|
||||
|
||||
$scope.team_id = id;
|
||||
|
||||
// manipulate the choices from the options request to be usable
|
||||
// by the search option for permission_type, you can't inject the
|
||||
// list until this is done!
|
||||
@@ -222,8 +220,11 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
});
|
||||
generator.inject(form, { mode: 'edit', related: true, scope: $scope });
|
||||
generator.reset();
|
||||
$scope.$emit('loadTeam');
|
||||
});
|
||||
|
||||
$scope.team_id = id;
|
||||
|
||||
$scope.PermissionAddAllowed = false;
|
||||
|
||||
// Retrieve each related set and any lookups
|
||||
@@ -254,6 +255,11 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
}
|
||||
});
|
||||
|
||||
// Retrieve each related set and any lookups
|
||||
if ($scope.loadTeamRemove) {
|
||||
$scope.loadTeamRemove();
|
||||
}
|
||||
$scope.loadTeamRemove = $scope.$on('loadTeam', function () {
|
||||
// Retrieve detail record and prepopulate the form
|
||||
Wait('start');
|
||||
Rest.setUrl(defaultUrl + ':id/');
|
||||
@@ -307,6 +313,7 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
ProcessErrors($scope, data, status, form, { hdr: 'Error!', msg: 'Failed to retrieve team: ' + $routeParams.team_id +
|
||||
'. GET status: ' + status });
|
||||
});
|
||||
});
|
||||
|
||||
$scope.getPermissionText = function () {
|
||||
if (this.permission.permission_type !== "admin" && this.permission.run_ad_hoc_commands) {
|
||||
|
||||
@@ -242,10 +242,6 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
});
|
||||
});
|
||||
|
||||
if ($scope.removeFormReady) {
|
||||
$scope.removeFormReady();
|
||||
}
|
||||
$scope.removeFormReady = $scope.$on('formReady', function () {
|
||||
// manipulate the choices from the options request to be usable
|
||||
// by the search option for permission_type, you can't inject the
|
||||
// list until this is done!
|
||||
@@ -256,8 +252,13 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
});
|
||||
generator.inject(form, { mode: 'edit', related: true, scope: $scope });
|
||||
generator.reset();
|
||||
$scope.$emit("loadForm");
|
||||
});
|
||||
|
||||
if ($scope.removeFormReady) {
|
||||
$scope.removeFormReady();
|
||||
}
|
||||
$scope.removeFormReady = $scope.$on('formReady', function () {
|
||||
if ($scope.removePostRefresh) {
|
||||
$scope.removePostRefresh();
|
||||
}
|
||||
@@ -471,6 +472,11 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
// Put form back to its original state
|
||||
ResetForm();
|
||||
|
||||
if ($scope.removeLoadForm) {
|
||||
$scope.removeLoadForm();
|
||||
}
|
||||
$scope.removeLoadForm = $scope.$on('loadForm', function () {
|
||||
|
||||
|
||||
if ($scope.removeModifyForm) {
|
||||
$scope.removeModifyForm();
|
||||
@@ -516,6 +522,7 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
||||
ProcessErrors($scope, data, status, null, { hdr: 'Error!',
|
||||
msg: 'Failed to retrieve user: ' + id + '. GET status: ' + status });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
UsersEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'UserForm', 'GenerateForm',
|
||||
|
||||
Reference in New Issue
Block a user