mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-14 00:58:36 -05:00
On Job Template save: redirect to proper dest
return to job template list if adding/editing a job template from the list; likewise return to hte inventory properties if adding/editing from that page
This commit is contained in:
@@ -486,7 +486,17 @@ export function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $
|
||||
|
||||
|
||||
function saveCompleted() {
|
||||
setTimeout(function() { $scope.$apply(function() { $location.path('/job_templates'); }); }, 500);
|
||||
setTimeout(function() {
|
||||
$scope.$apply(function() {
|
||||
var base = $location.path().replace(/^\//, '').split('/')[0];
|
||||
if (base === 'job_templates') {
|
||||
ReturnToCaller();
|
||||
}
|
||||
else {
|
||||
ReturnToCaller(1);
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
|
||||
if ($scope.removeTemplateSaveSuccess) {
|
||||
@@ -979,7 +989,17 @@ export function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log,
|
||||
});
|
||||
|
||||
function saveCompleted() {
|
||||
setTimeout(function() { $scope.$apply(function() { $location.path('/job_templates'); }); }, 500);
|
||||
setTimeout(function() {
|
||||
$scope.$apply(function() {
|
||||
var base = $location.path().replace(/^\//, '').split('/')[0];
|
||||
if (base === 'job_templates') {
|
||||
ReturnToCaller();
|
||||
}
|
||||
else {
|
||||
ReturnToCaller(1);
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
|
||||
if ($scope.removeTemplateSaveSuccess) {
|
||||
|
||||
Reference in New Issue
Block a user