diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js index 47f0a521f8..4f267f8349 100644 --- a/awx/ui/static/js/helpers/JobSubmission.js +++ b/awx/ui/static/js/helpers/JobSubmission.js @@ -14,8 +14,8 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'CredentialFormDefinition', 'CredentialsListDefinition', 'LookUpHelper', 'JobSubmissionHelper', 'JobTemplateFormDefinition', 'ModalDialog', 'FormGenerator', 'JobVarsPromptFormDefinition']) -.factory('LaunchJob', ['Rest', 'Wait', 'ProcessErrors', 'ToJSON', - function(Rest, Wait, ProcessErrors, ToJSON) { +.factory('LaunchJob', ['Rest', 'Wait', 'ProcessErrors', 'ToJSON', 'Empty', + function(Rest, Wait, ProcessErrors, ToJSON, Empty) { return function(params) { var scope = params.scope, // passwords = params.passwords || {}, @@ -25,7 +25,7 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential fld; - if(scope.passwords_needed_to_start.length>0){ + if(!Empty(scope.passwords_needed_to_start) && scope.passwords_needed_to_start .length>0){ scope.passwords.forEach(function(password) { job_launch_data[password] = scope[password]; }); @@ -607,8 +607,8 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi // required: true, // value: '' // } - // function Ctrl($scope) { - // $scope.field = { + // function Ctrl(scope) { + // scope.field = { // name:'multi checkboxes', // value:'', // required:true, @@ -628,7 +628,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi html+='
'; for( j = 0; j' + + html+= '' + ''+choices[j] +'
' ; } html+= '
- Jobs + My Jobs