Bugzilla – Attachment 174586 Details for
Bug 38459
Cities dropdown should work for quick add form as well
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38459: Ensure cities field works in patron quick add
Bug-38459-Ensure-cities-field-works-in-patron-quic.patch (text/plain), 3.07 KB, created by
Nick Clemens (kidclamp)
on 2024-11-15 14:55:41 UTC
(
hide
)
Description:
Bug 38459: Ensure cities field works in patron quick add
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-11-15 14:55:41 UTC
Size:
3.07 KB
patch
obsolete
>From 86c1f2c7c7577ab6ac5b88b2768fa1acd5687d6c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 15 Nov 2024 14:53:40 +0000 >Subject: [PATCH] Bug 38459: Ensure cities field works in patron quick add > >This patch adjust the selector for quick add and updates the change event for the city >dropdown to affect quickadd fields as well > >To test: > 1 - Administration->Cities and towns > 2 - Define several cities > 3 - http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronQuickAddFields > 4 - Select city,state, zipcode and some other fields > 5 - Patrons->Quick add new patron > 6 - Note city field/dropdown does not show > 7 - Apply patch > 8 - Reload > 9 - City dropdown shows! >10 - State and zip are updated when city is selected! >11 - Celebrate! >--- > .../prog/en/modules/members/memberentrygen.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/members.js | 8 ++++---- > 2 files changed, 5 insertions(+), 5 deletions(-) > >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 f0afef90e0c..b1d75745d0d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -2043,7 +2043,7 @@ legend.collapsed i.fa.fa-caret-down::before { > }); > new_field.appendTo("#quick_add_list"); > } else { >- let orig_input_id = orig_li.children("input,textarea,select").attr("id"); >+ let orig_input_id = orig_li.children("input,textarea,select").last().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"); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 2f58cb888c0..502ed2aa799 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -226,10 +226,10 @@ $(document).ready(function(){ > var addressfield = $(this).data("addressfield"); > var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/); > var matches = selected_city.match( myRegEx ); >- $("#" + addressfield + "zipcode").val( matches[1] ); >- $("#" + addressfield + "city").val( matches[2] ); >- $("#" + addressfield + "state").val( matches[3] ); >- $("#" + addressfield + "country").val( matches[4] ); >+ $("#" + addressfield + "zipcode,#" + addressfield + "zipcode_quick_add").val( matches[1] ); >+ $("#" + addressfield + "city,#" + addressfield + "city_quick_add").val( matches[2] ); >+ $("#" + addressfield + "state,#" + addressfield + "state_quick_add").val( matches[3] ); >+ $("#" + addressfield + "country,#" + addressfield + "country_quick_add").val( matches[4] ); > }); > > dateformat = $("#dateofbirth").siblings(".hint").first().html(); >-- >2.39.5
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 38459
: 174586