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

Fixes the remaining jQuery `.prop()` uses.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2024-03-17 17:55:16 +01:00 committed by Earl Warren
parent 18256b024e
commit 4db9cbc29c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -12,7 +12,7 @@ export function initAdminUserListSearchForm() {
if (searchForm.StatusFilterMap) {
for (const [k, v] of Object.entries(searchForm.StatusFilterMap)) {
if (!v) continue;
$form.find(`input[name="status_filter[${k}]"][value=${v}]`).prop('checked', true);
$form.find(`input[name="status_filter[${k}]"][value=${v}]`).checked = true;
}
}
@ -25,7 +25,7 @@ export function initAdminUserListSearchForm() {
$form.find(`input[type=radio]`).each((_, e) => {
const $e = $(e);
if ($e.attr('name').startsWith('status_filter[')) {
$e.prop('checked', false);
$e.checked = false;
}
});
$form.trigger('submit');