summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/admin
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-24 18:56:02 +0100
committerGitHub <noreply@github.com>2024-03-24 17:56:02 +0000
commit0a2f973de9b681a472c96bdfcd945978e88458d8 (patch)
tree4df05bf0d064a53a670cd03ccd67dc61b59234e7 /web_src/js/features/admin
parent8d93cea2969730fc8f3bdeb3704a3b89db0bbcc0 (diff)
downloadgitea-0a2f973de9b681a472c96bdfcd945978e88458d8.tar.gz
gitea-0a2f973de9b681a472c96bdfcd945978e88458d8.zip
Forbid jQuery `is` and fix issues (#30016)
Tested all functionality. --------- Co-authored-by: Yarden Shoham <git@yardenshoham.com>
Diffstat (limited to 'web_src/js/features/admin')
-rw-r--r--web_src/js/features/admin/common.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/admin/common.js b/web_src/js/features/admin/common.js
index 0c65f04ab8..3c485d67a6 100644
--- a/web_src/js/features/admin/common.js
+++ b/web_src/js/features/admin/common.js
@@ -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