From 68bf0e57a61ce7e8c836223e452ef013c7ff9cf4 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Tue, 7 Jun 2016 18:05:03 -0400 Subject: [PATCH] Fixed job launch weirdness where having only a survey show on job launch resulted in an error. This should also fix the bug where relaunching where no passwords were needed was showing a halfway empty modal. --- .../client/src/job-submission/job-submission.controller.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/job-submission/job-submission.controller.js b/awx/ui/client/src/job-submission/job-submission.controller.js index 6149c74018..acefe6aa07 100644 --- a/awx/ui/client/src/job-submission/job-submission.controller.js +++ b/awx/ui/client/src/job-submission/job-submission.controller.js @@ -187,8 +187,11 @@ export default updateRequiredPasswords(); } - if($scope.can_start_without_user_input && !$scope.ask_inventory_on_launch && !$scope.ask_credential_on_launch && !$scope.has_other_prompts) { - // The job can be launched without any user input + if( (isRelaunch && !$scope.password_needed) || (!isRelaunch && $scope.can_start_without_user_input && !$scope.ask_inventory_on_launch && !$scope.ask_credential_on_launch && !$scope.has_other_prompts && !$scope.survey_enabled)) { + // The job can be launched if + // a) It's a relaunch and no passwords are needed + // or + // b) It's not a relaunch and there's not any prompting/surveys launchJob(); Wait('stop'); }