diff --git a/awx/ui/client/src/configuration/auth-form/sub-forms/auth-ldap.form.js b/awx/ui/client/src/configuration/auth-form/sub-forms/auth-ldap.form.js index 0943d21b27..3ae57a011d 100644 --- a/awx/ui/client/src/configuration/auth-form/sub-forms/auth-ldap.form.js +++ b/awx/ui/client/src/configuration/auth-form/sub-forms/auth-ldap.form.js @@ -26,8 +26,18 @@ export default ['i18n', function(i18n) { }, AUTH_LDAP_USER_SEARCH: { type: 'textarea', + rows: 6, + codeMirror: true, + class: 'Form-textAreaLabel Form-formGroup--fullWidth', reset: 'AUTH_LDAP_USER_SEARCH' }, + AUTH_LDAP_GROUP_SEARCH: { + type: 'textarea', + rows: 6, + codeMirror: true, + class: 'Form-textAreaLabel Form-formGroup--fullWidth', + reset: 'AUTH_LDAP_GROUP_SEARCH' + }, AUTH_LDAP_USER_DN_TEMPLATE: { type: 'text', reset: 'AUTH_LDAP_USER_DN_TEMPLATE' @@ -39,10 +49,6 @@ export default ['i18n', function(i18n) { codeMirror: true, class: 'Form-textAreaLabel Form-formGroup--fullWidth', }, - AUTH_LDAP_GROUP_SEARCH: { - type: 'textarea', - reset: 'AUTH_LDAP_GROUP_SEARCH' - }, AUTH_LDAP_GROUP_TYPE: { type: 'select', reset: 'AUTH_LDAP_GROUP_TYPE', diff --git a/awx/ui/client/src/configuration/configuration.controller.js b/awx/ui/client/src/configuration/configuration.controller.js index 5cfdf1763d..16f40901db 100644 --- a/awx/ui/client/src/configuration/configuration.controller.js +++ b/awx/ui/client/src/configuration/configuration.controller.js @@ -76,7 +76,7 @@ export default [ $scope[key] = data[key].toString(); } else if(key === "AUTH_LDAP_USER_SEARCH" || key === "AUTH_LDAP_GROUP_SEARCH"){ - $scope[key] = data[key]; + $scope[key] = JSON.stringify(data[key]); } else { $scope[key] = ConfigurationUtils.arrayToList(data[key], key); @@ -380,7 +380,8 @@ export default [ } else if($scope.configDataResolve[key].type === 'list' && $scope[key] !== null) { if(key === "AUTH_LDAP_USER_SEARCH" || key === "AUTH_LDAP_GROUP_SEARCH"){ - payload[key] = $scope[key]; + payload[key] = $scope[key] === "{}" ? [] : ToJSON($scope.parseType, + $scope[key]); } else { // Parse lists