From d9c5904f698c3ed9337acffd763be964e4a9841c Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Mon, 27 Jul 2015 09:35:17 -0400 Subject: [PATCH] made project autopopulate in permission form --- awx/ui/static/js/controllers/Permissions.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/awx/ui/static/js/controllers/Permissions.js b/awx/ui/static/js/controllers/Permissions.js index 95763c74bf..82c05cdff0 100644 --- a/awx/ui/static/js/controllers/Permissions.js +++ b/awx/ui/static/js/controllers/Permissions.js @@ -153,6 +153,22 @@ export function PermissionsAdd($scope, $rootScope, $compile, $location, $log, $r input_type: 'radio' }); + $scope.$watch("category", function(val) { + if (val === 'Deploy') { + $scope.projectrequired = true; + LookUpInit({ + scope: $scope, + form: form, + current_item: null, + list: ProjectList, + field: 'project', + input_type: 'radio' + }); + } else { + $scope.projectrequired = false; + } + }); + $scope.changeAdhocCommandCheckbox = function () { if ($scope.category === 'Deploy') { $scope.run_ad_hoc_command = false;