diff --git a/awx/ui/client/src/configuration/auth-form/configuration-auth.controller.js b/awx/ui/client/src/configuration/auth-form/configuration-auth.controller.js index d8ca6d97f9..5acfaec62e 100644 --- a/awx/ui/client/src/configuration/auth-form/configuration-auth.controller.js +++ b/awx/ui/client/src/configuration/auth-form/configuration-auth.controller.js @@ -313,6 +313,15 @@ export default [ populateTacacsProtocol(false); }); + $scope.$on('codeMirror_populated', function() { + let tab = $stateParams.currentTab; + if (tab === 'auth') { + startCodeMirrors(); + codeInputInitialized = true; + } + }); + + angular.extend(authVm, { activeForm: activeForm, activeAuthForm: activeAuthForm, diff --git a/awx/ui/client/src/configuration/configuration.controller.js b/awx/ui/client/src/configuration/configuration.controller.js index 410248cf1e..88193cc615 100644 --- a/awx/ui/client/src/configuration/configuration.controller.js +++ b/awx/ui/client/src/configuration/configuration.controller.js @@ -310,11 +310,12 @@ export default [ else if($scope[key + '_field'].reset === "CUSTOM_LOGO"){ $scope.$broadcast(key+'_reverted'); } - else if($scope[key + '_field'].type === "textarea" && _.isArray($scope.configDataResolve[key].default)){ - $scope[key] = ConfigurationUtils.arrayToList($scope[key], key); - } else if($scope[key + '_field'].hasOwnProperty('codeMirror')){ - $scope[key] = '{}'; + if (key === "AUTH_LDAP_USER_SEARCH" || key === "AUTH_LDAP_GROUP_SEARCH") { + $scope[key] = '[]'; + } else { + $scope[key] = '{}'; + } $scope.$broadcast('codeMirror_populated', key); } loginUpdate();