Bugzilla – Attachment 181902 Details for
Bug 39828
QuickAdd skips fields from PatronQuickAddFields in some cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39828: Fix QuickAdd skipping fields
Bug-39828-Fix-QuickAdd-skipping-fields.patch (text/plain), 1.93 KB, created by
Slava Shishkin
on 2025-05-05 09:30:16 UTC
(
hide
)
Description:
Bug 39828: Fix QuickAdd skipping fields
Filename:
MIME Type:
Creator:
Slava Shishkin
Created:
2025-05-05 09:30:16 UTC
Size:
1.93 KB
patch
obsolete
>From 92806d3381edfdbb42df002a4ec08423a485cc14 Mon Sep 17 00:00:00 2001 >From: Slava Shishkin <slavashishkin@gmail.com> >Date: Fri, 2 May 2025 19:51:30 +0300 >Subject: [PATCH] Bug 39828: Fix QuickAdd skipping fields >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Currently, fields like userid are skipped if the last input in the main form >is hidden or has no ID. This patch fixes the selection logic to avoid skipping. > >Steps to reproduce: >1. Add userid (or any other field that matches above structure) to PatronQuickAddFields. >2. Open the Add Patron form and use Quick Add. >3. Observe รข the field is missing. >4. Apply the patch. >5. Use Quick Add again and observe that 'Username' field is there. >--- > .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 361a178107c..49b3405006b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1914,7 +1914,9 @@ > }); > new_field.appendTo("#quick_add_list"); > } else { >- let orig_input_id = orig_li.children("input,textarea,select").last().attr("id"); >+ let orig_input_id = orig_li.children("input,textarea,select").filter(function() { >+ return $(this).attr("id") && !$(this).is(':disabled') && $(this).css('display') !== 'none'; >+ }).first().attr("id"); > if ( orig_input_id ) { > let new_field = orig_li.clone(); > new_field.children("#"+orig_input_id).attr("id",orig_input_id + "_quick_add"); >-- >2.49.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 39828
:
181902
|
181972