[Web] add generic-oidc provider
This commit is contained in:
parent
642d6a332c
commit
7188936e73
|
@ -750,9 +750,9 @@ jQuery(function($){
|
||||||
add_table_row($('#f2b_regex_table'), "f2b_regex");
|
add_table_row($('#f2b_regex_table'), "f2b_regex");
|
||||||
});
|
});
|
||||||
// IAM test connection
|
// IAM test connection
|
||||||
$('#iam_test_connection').click(async function(e){
|
$('.iam_test_connection').click(async function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var data = { attr: $('form[data-id="iam_sso"]').serializeObject() };
|
var data = { attr: $('form[data-id="' + $(this).data('id') + '"]').serializeObject() };
|
||||||
var res = await fetch("/api/v1/edit/identity-provider-test", {
|
var res = await fetch("/api/v1/edit/identity-provider-test", {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
@ -768,7 +768,7 @@ jQuery(function($){
|
||||||
return mailcow_alert_box(lang_danger.iam_test_connection, 'danger');
|
return mailcow_alert_box(lang_danger.iam_test_connection, 'danger');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#iam_rolemap_add').click(async function(e){
|
$('.iam_rolemap_add').click(async function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var parent = $(this).parent().parent();
|
var parent = $(this).parent().parent();
|
||||||
|
@ -791,4 +791,15 @@ jQuery(function($){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).parent().remove();
|
$(this).parent().remove();
|
||||||
});
|
});
|
||||||
|
// selecting identity provider
|
||||||
|
$('#iam_provider').on('change', function(){
|
||||||
|
// toggle password fields
|
||||||
|
if (this.value === 'keycloak'){
|
||||||
|
$('#keycloak_settings').removeClass('d-none');
|
||||||
|
$('#generic_oidc_settings').addClass('d-none');
|
||||||
|
} else if (this.value === 'generic-oidc') {
|
||||||
|
$('#keycloak_settings').addClass('d-none');
|
||||||
|
$('#generic_oidc_settings').removeClass('d-none');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue