Bug 41065: (bug 26553 follow-up) Remove JS error when submitting the form

Uncaught TypeError: patron_table.$ is not a function

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ea123185b9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Jonathan Druart 2025-10-22 08:55:04 +02:00 committed by Paul Derscheid
parent e1aa995904
commit ea84926d84
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 1 additions and 1 deletions

View File

@ -569,7 +569,7 @@
$('form[name="f"]').on("submit", function(){
// Add the checkboxes to the DOM before we submit the form
var form = this;
var checkboxes = patron_table.$('input:checkbox:checked').serializeArray();
var checkboxes = $(patron_table).find('input:checkbox:checked').serializeArray();
$.each(checkboxes, function(){
let borrowernumber = this.value;
if(!$(form).find('input[name="borrowernumber"][value="'+borrowernumber+'"]').length){