fixed the become hide of password on select option null for credentials

This commit is contained in:
John Mitchell 2015-07-23 17:03:13 -04:00
parent fa93c8bbd3
commit b0f7df8fa9
2 changed files with 6 additions and 0 deletions

View File

@ -400,6 +400,10 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
break;
}
}
if ($scope.become_method && $scope.become_method.value === "") {
$scope.become_method = null;
}
master.become_method = $scope.become_method;
for (i = 0; i < $scope.credential_kind_options.length; i++) {

View File

@ -220,6 +220,8 @@ angular.module('CredentialsHelper', ['Utilities'])
data.kind = scope.kind.value;
if (scope.become_method === null) {
data.become_method = "";
data.become_username = "";
data.become_password = "";
} else {
data.become_method = (scope.become_method.value) ? scope.become_method.value : "";
}