Forbid jQuery .prop and fix related issues (#29832)

The issue checkbox code received a few more cleanups and I specifically
tested it. The other changes are trivial. Also, I checked the cases for
how many elements match the jQuery selection to determine querySelector
vs. querySelectorAll.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 21fe512aac42c9ce3440b8eaae6b2cb2116a0e50)
This commit is contained in:
silverwind 2024-03-16 16:08:10 +01:00 committed by Earl Warren
parent c1b6182625
commit 18256b024e
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
6 changed files with 37 additions and 27 deletions

View file

@ -49,7 +49,7 @@ export function initAdminCommon() {
}
function onUsePagedSearchChange() {
if ($('#use_paged_search').prop('checked')) {
if (document.getElementById('use_paged_search').checked) {
showElem('.search-page-size');
$('.search-page-size').find('input').attr('required', 'required');
} else {