made project autopopulate in permission form

This commit is contained in:
John Mitchell 2015-07-27 09:35:17 -04:00
parent d56ab2b18b
commit d9c5904f69

View File

@ -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;