mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 17:51:06 -03:30
handle revert of ldap user and group search fields
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user