Merge pull request #2692 from kialam/fix-2586-ldap-dropdown-fix

Fix LDAP and TACACS+ dropdowns

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2018-11-16 15:28:09 +00:00 committed by GitHub
commit 86510029e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -199,7 +199,6 @@ export default [
name: 'ldap5'
},
];
var forms = _.map(authForms, 'formDef');
_.each(forms, function(form) {
var keys = _.keys(form.fields);
@ -207,9 +206,9 @@ export default [
if($scope.configDataResolve[key].type === 'choice') {
// Create options for dropdowns
var optionsGroup = key + '_options';
$scope.$parent[optionsGroup] = [];
$scope.$parent.$parent[optionsGroup] = [];
_.each($scope.configDataResolve[key].choices, function(choice){
$scope.$parent[optionsGroup].push({
$scope.$parent.$parent[optionsGroup].push({
name: choice[0],
label: choice[1],
value: choice[0]
@ -303,7 +302,7 @@ export default [
}
if($scope.$parent[groupPropName] !== null) {
$scope.$parent[groupPropName] = _.find($scope[groupOptionsPropName], { value: $scope.$parent[groupPropName] });
$scope.$parent.$parent[groupPropName] = _.find($scope[groupOptionsPropName], { value: $scope.$parent[groupPropName] });
}
if(flag !== undefined){
@ -322,7 +321,7 @@ export default [
function populateTacacsProtocol(flag){
if($scope.$parent.TACACSPLUS_AUTH_PROTOCOL !== null) {
$scope.$parent.TACACSPLUS_AUTH_PROTOCOL = _.find($scope.$parent.TACACSPLUS_AUTH_PROTOCOL_options, { value: $scope.$parent.TACACSPLUS_AUTH_PROTOCOL });
$scope.$parent.$parent.TACACSPLUS_AUTH_PROTOCOL = _.find($scope.$parent.TACACSPLUS_AUTH_PROTOCOL_options, { value: $scope.$parent.TACACSPLUS_AUTH_PROTOCOL });
}
if(flag !== undefined){

View File

@ -35,7 +35,9 @@
width: 100%;
margin: 0 0 22px auto;
display: flex;
justify-content: flex-end;
justify-content: flex-start;
border-bottom: 1px solid @at-gray-b7;
padding-bottom: 22px;
}
.Form-nav--ldapDropdownContainer {