mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
House fixed issue on job template form when project was deleted, changed, or reloaded from a previous saved form
This commit is contained in:
@@ -467,14 +467,18 @@ function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeP
|
|||||||
if ($scope.watchProjectUnregister) {
|
if ($scope.watchProjectUnregister) {
|
||||||
$scope.watchProjectUnregister();
|
$scope.watchProjectUnregister();
|
||||||
}
|
}
|
||||||
$scope.watchProjectUnregister = $scope.$watch('project_name', function (newValue, oldValue) {
|
$scope.watchProjectUnregister = $scope.$watch('project', function (newValue, oldValue) {
|
||||||
if (oldValue !== newValue && newValue !== '' && newValue !== null && newValue !== undefined) {
|
if (newValue !== oldValue) {
|
||||||
$scope.playbook = null;
|
if (!Empty(oldValue)) {
|
||||||
|
$scope.playbook = null;
|
||||||
|
}
|
||||||
getPlaybooks($scope.project);
|
getPlaybooks($scope.project);
|
||||||
checkSCMStatus();
|
checkSCMStatus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Turn off 'Wait' after both cloud credential and playbook list come back
|
// Turn off 'Wait' after both cloud credential and playbook list come back
|
||||||
if ($scope.removeJobTemplateLoadFinished) {
|
if ($scope.removeJobTemplateLoadFinished) {
|
||||||
$scope.removeJobTemplateLoadFinished();
|
$scope.removeJobTemplateLoadFinished();
|
||||||
|
|||||||
Reference in New Issue
Block a user