Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated ActiveDirectory and OpenLDAP fields #377

Open
wants to merge 1 commit into
base: 1110-vue3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/views/SecurityAndAccess/Ldap/Ldap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ import TableRoleGroups from './TableRoleGroups.vue';
import { LdapStore } from '../../../store';
import { CertificatesStore } from '../../../store';
import { onBeforeMount, reactive } from 'vue';
import { onBeforeRouteLeave } from 'vue-router';
import useLoadingBar from '../../../components/Composables/useLoadingBarComposable';
import useVuelidateComposable from '@/components/Composables/useVuelidateComposable';
import { computed, watch } from 'vue';
Expand All @@ -262,10 +263,10 @@ const certificatesStore = CertificatesStore();
const { getValidationState } = useVuelidateComposable();
const { hideLoader, startLoader, endLoader, loading } = useLoadingBar();
const { successToast, errorToast } = useToast();
function beforeRouteLeave(to, from, next) {

onBeforeRouteLeave(() => {
hideLoader();
next();
}
});

const initialFormState = {
ldapAuthenticationEnabled: ldapStore.isServiceEnabledGetter,
Expand Down Expand Up @@ -450,9 +451,7 @@ function handleSubmit() {
function onChangeServiceType(event) {
v$.value.formLdap.activeDirectoryEnabled.$touch();
const isActiveDirectoryEnabled = event.target.value;
const serviceType = isActiveDirectoryEnabled
? activeDirectory.value
: ldap.value;
const serviceType = isActiveDirectoryEnabled==="true" ? activeDirectory.value : ldap.value;
// Set form values according to user selected
// service type
setFormValues(serviceType);
Expand Down