Forbid jQuery is and fix issues (#30016)

Tested all functionality.

---------

Co-authored-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit 0a2f973de9b681a472c96bdfcd945978e88458d8)
This commit is contained in:
silverwind 2024-03-24 18:56:02 +01:00 committed by Earl Warren
parent c5eae64e06
commit e28f4328b3
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 9 additions and 9 deletions

View file

@ -84,7 +84,7 @@ export function initAdminCommon() {
hideElem($('.oauth2_use_custom_url_field'));
$('.oauth2_use_custom_url_field input[required]').removeAttr('required');
if ($('#oauth2_use_custom_url').is(':checked')) {
if (document.getElementById('oauth2_use_custom_url')?.checked) {
for (const custom of ['token_url', 'auth_url', 'profile_url', 'email_url', 'tenant']) {
if (applyDefaultValues) {
$(`#oauth2_${custom}`).val($(`#${provider}_${custom}`).val());
@ -98,7 +98,7 @@ export function initAdminCommon() {
}
function onEnableLdapGroupsChange() {
toggleElem($('#ldap-group-options'), $('.js-ldap-group-toggle').is(':checked'));
toggleElem($('#ldap-group-options'), $('.js-ldap-group-toggle')[0].checked);
}
// New authentication