From b5644ed65b41c640e2e0cec5e97ab143976acf80 Mon Sep 17 00:00:00 2001 From: gconsidine Date: Tue, 5 Dec 2017 10:39:15 -0500 Subject: [PATCH] Fix replace/revert functionality on secret input fields --- .../features/credentials/edit-credentials.controller.js | 2 +- awx/ui/client/lib/components/input/secret.directive.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/features/credentials/edit-credentials.controller.js b/awx/ui/client/features/credentials/edit-credentials.controller.js index f39f3abd52..cbe1d9cb3b 100644 --- a/awx/ui/client/features/credentials/edit-credentials.controller.js +++ b/awx/ui/client/features/credentials/edit-credentials.controller.js @@ -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 { diff --git a/awx/ui/client/lib/components/input/secret.directive.js b/awx/ui/client/lib/components/input/secret.directive.js index 542103eba3..01b16d412b 100644 --- a/awx/ui/client/lib/components/input/secret.directive.js +++ b/awx/ui/client/lib/components/input/secret.directive.js @@ -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';