Bugzilla – Attachment 186311 Details for
Bug 40783
The bookbag_form should not be submittable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40783: Fix erroneous bookbag_form submission
Bug-40783-Fix-erroneous-bookbagform-submission.patch (text/plain), 1.55 KB, created by
Jake Deery
on 2025-09-10 09:13:58 UTC
(
hide
)
Description:
Bug 40783: Fix erroneous bookbag_form submission
Filename:
MIME Type:
Creator:
Jake Deery
Created:
2025-09-10 09:13:58 UTC
Size:
1.55 KB
patch
obsolete
>From 8a3e3b95356e67bd70f1051b47b52cd985357848 Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@openfifth.co.uk> >Date: Tue, 9 Sep 2025 11:44:11 +0000 >Subject: [PATCH] Bug 40783: Fix erroneous bookbag_form submission > >This patch addresses a bug where pressing return when focused on the >bookbag_form checkbox results in a form submission. The bookbag_form is >not designed to be submitted, so the behaviour has been disabled for >accessibility reasons. > >TO TEST: >a) go to /cgi-bin/koha/opac-search.pl?idx=kw&q=history&sort_by=relevance >b) add an item to your cart (ensure the syspref is enabled) >c) tab through the results until you come across a checkbox, press >return >d) notice your page refresh, a form submission has happened >APPLY PATCH >e) repeat steps a-c >f) notice the page no longer refreshes, and that no form submission >occurs >g) notice the items are still in your cart and can be interacted with >normally >SIGN OFF >--- > koha-tmpl/opac-tmpl/bootstrap/js/results-list.js | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/results-list.js b/koha-tmpl/opac-tmpl/bootstrap/js/results-list.js >index e3b2b4b83cd..09e2b99972a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/results-list.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/results-list.js >@@ -149,6 +149,11 @@ $(document).ready(function () { > } > } > >+ $("#bookbag_form").on("submit", function (e) { >+ e.preventDefault(); >+ return false; >+ }) >+ > $("#addtocart").on("click", function (e) { > e.preventDefault(); > addMultiple(); >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40783
: 186311