making ldap user/group search fields into codemirror instances

This commit is contained in:
jaredevantabor 2017-04-25 14:47:14 -07:00
parent 86ae3082a4
commit b5d36e4038
2 changed files with 13 additions and 6 deletions

View File

@ -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',

View File

@ -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