Skip to content

Commit

Permalink
Fix replace/revert functionality on secret input fields
Browse files Browse the repository at this point in the history
  • Loading branch information
gconsidine committed Dec 5, 2017
1 parent 13d84b8 commit b5644ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function EditCredentialsController (models, $state, $scope, strings, componentsS
};

$scope.$watch('$state.current.name', (value) => {
if (/credentials.edit($|\.organization$)/.test(value)) {
if (/credentials.edit($|\.organization$|\.credentialType$)/.test(value)) {
vm.tab.details._active = true;
vm.tab.permissions._active = false;
} else {
Expand Down
6 changes: 6 additions & 0 deletions awx/ui/client/lib/components/input/secret.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ function AtInputSecretController (baseInputController) {
vm.check();
};

vm.toggleRevertReplace = () => {
scope.state._isBeingReplaced = !scope.state._isBeingReplaced;

vm.onRevertReplaceToggle();
};

vm.toggleShowHide = () => {
if (scope.type === 'password') {
scope.type = 'text';
Expand Down

0 comments on commit b5644ed

Please sign in to comment.