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 d028b25b6b..5562baedb1 100644 --- a/awx/ui/client/src/job-submission/job-submission.controller.js +++ b/awx/ui/client/src/job-submission/job-submission.controller.js @@ -104,11 +104,11 @@ export default } } else { - if($scope.selected_credentials.machine.kind === "ssh"){ - $scope.ssh_password_required = ($scope.selected_credentials.machine.password === "ASK") ? true : false; - $scope.ssh_key_unlock_required = ($scope.selected_credentials.machine.ssh_key_unlock === "ASK") ? true : false; - $scope.become_password_required = ($scope.selected_credentials.machine.become_password === "ASK") ? true : false; - $scope.vault_password_required = ($scope.selected_credentials.machine.vault_password === "ASK") ? true : false; + if($scope.selected_credentials.machine.credential_type === 1){ + $scope.ssh_password_required = ($scope.selected_credentials.machine.inputs && $scope.selected_credentials.machine.inputs.password === "ASK") ? true : false; + $scope.ssh_key_unlock_required = ($scope.selected_credentials.machine.inputs && $scope.selected_credentials.machine.inputs.ssh_key_unlock === "ASK") ? true : false; + $scope.become_password_required = $scope.selected_credentials.machine.inputs && ($scope.selected_credentials.machine.inputs.become_password === "ASK") ? true : false; + $scope.vault_password_required = ($scope.selected_credentials.machine.inputs && $scope.selected_credentials.machine.inputs.vault_password === "ASK") ? true : false; } else { clearRequiredPasswords(); diff --git a/awx/ui/client/src/job-submission/job-submission.partial.html b/awx/ui/client/src/job-submission/job-submission.partial.html index 3908228f5f..37ab037ef5 100644 --- a/awx/ui/client/src/job-submission/job-submission.partial.html +++ b/awx/ui/client/src/job-submission/job-submission.partial.html @@ -91,8 +91,8 @@