Bugzilla – Attachment 190646 Details for
Bug 41439
Column filtering on the circ rules table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41439: Fix form submission for hidden column inputs
e9928eb.patch (text/plain), 2.08 KB, created by
Martin Renvoize (ashimema)
on 2025-12-19 12:56:42 UTC
(
hide
)
Description:
Bug 41439: Fix form submission for hidden column inputs
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-12-19 12:56:42 UTC
Size:
2.08 KB
patch
obsolete
>From e9928eb10bd7dab45f3118a55900cf0ccf06f9f0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Fri, 19 Dec 2025 10:19:04 +0000 >Subject: [PATCH] Bug 41439: Fix form submission for hidden column inputs > >When using the column visibility toggles, only inputs in the >currently visible columns were being submitted with the form. >This meant that if a user edited a value in "Checkouts" view, >then switched to "Holds" view to edit another value, only the >holds values would be saved. > >This patch adds a form submit handler that temporarily shows >all columns before form submission, ensuring all input values >are included regardless of which view is currently active. > >Test plan: >1. Navigate to Administration > Circulation and fine rules >2. Click "Checkouts" button >3. Enter a value in "Current checkouts allowed" field >4. Click "Holds" button >5. Enter a value in "Holds allowed (total)" field >6. Click Save >7. Verify both values are saved (previously only the holds > value would be saved) >--- > .../intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index b0ce725734d..3b2ee24751e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -1620,6 +1620,14 @@ > > // Default to Checkouts view on page load > buttonContainer.find('button:first').trigger('click'); >+ >+ // Ensure all form inputs are submitted, even those in hidden columns >+ $('#default-circulation-rules').closest('form').on('submit', function(e) { >+ // Show all columns before form submission to ensure all inputs are included >+ dtApi.columns().visible(true); >+ dtApi.columns(getColumnSelector(['sort-patron', 'sort-item'])).visible(false); >+ // Form will submit normally after this >+ }); > }); > > function clear_edit() { >-- >2.52.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 41439
:
190455
|
190456
|
190459
|
190546
| 190646