From e9928eb10bd7dab45f3118a55900cf0ccf06f9f0 Mon Sep 17 00:00:00 2001 From: Martin Renvoize 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