From 356d71d168de64f0d930ef86cf2ca17fa865cf5e Mon Sep 17 00:00:00 2001 From: Lai Wei Date: Thu, 7 Mar 2024 13:39:17 +0000 Subject: [PATCH] bug fix on IdP and authentication configuration page UI settings availability --- auth/oidc/js/module.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/auth/oidc/js/module.js b/auth/oidc/js/module.js index c464a8af4..08c510f8a 100644 --- a/auth/oidc/js/module.js +++ b/auth/oidc/js/module.js @@ -35,10 +35,17 @@ M.auth_oidc.init = function(Y, idptype_ms, authmethodsecret, authmethodcertifica $clientauthmethod.change(function() { if ($(this).val() == authmethodcertificate) { - $clientcert.prop('disabled', false); - $clientprivatekey.prop('disabled', false); - $clientprivatekeyfile.prop('disabled', false); - $clientcertfile.prop('disabled', false); + if ($clientcertsource.val() == 'file') { + $clientcert.prop('disabled', true); + $clientprivatekey.prop('disabled', true); + $clientprivatekeyfile.prop('disabled', false); + $clientcertfile.prop('disabled', false); + } else { + $clientcert.prop('disabled', false); + $clientprivatekey.prop('disabled', false); + $clientprivatekeyfile.prop('disabled', true); + $clientcertfile.prop('disabled', true); + } $clientcertpassphrase.prop('disabled', false); $clientcertsource.prop('disabled', false); } else {