Bugzilla – Attachment 171947 Details for
Bug 31470
Incorrect selector for relationship dropdown used in members.js
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31470: Do not change relationship value when adding a patron guarantor
Bug-31470-Do-not-change-relationship-value-when-ad.patch (text/plain), 3.17 KB, created by
Lucas Gass (lukeg)
on 2024-09-24 16:09:15 UTC
(
hide
)
Description:
Bug 31470: Do not change relationship value when adding a patron guarantor
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-09-24 16:09:15 UTC
Size:
3.17 KB
patch
obsolete
>From 6c3cfb7b71aa53031286a5d7471f7245889216cf Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Wed, 5 Jun 2024 10:21:43 +0300 >Subject: [PATCH] Bug 31470: Do not change relationship value when adding a > patron guarantor > >Adding new id "relationship" led to unexpected behaviour >in relationship handling. If one edits patron with >non-patron guarantor and added patron guarantor, non-patron >guarantors relatioship field was set as empty value which is >first option on select field. This patch removes code which >sets relationship select field to use first value of option >automatically when patron guarantor is added. > >Also thi patch add missing id to mandatory relatioship field. > >To test: >1. Add or edit patron. >2. Add non-patron guarantor for patron and select some value >as their relationship. >3. Then add a patron guarantor. >=> Note that non-patron guarantors relationship is empty. >4. Apply this patch. >5. Repeat steps 1 to 3. >=> Relationship shouldn't change. > >Sponsored-by: Koha-Suomi Oy >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/members.js | 1 - > 2 files changed, 1 insertion(+), 2 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 73432008c44..1c9e15ece82 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -703,7 +703,7 @@ legend.collapsed i.fa.fa-caret-down::before { > <li> > [% IF mandatoryrelationship %] > <label for="relationship" class="required">Relationship: </label> >- <select class="relationship" name="relationship" required="required"> >+ <select class="relationship" name="relationship" id="relationship" required="required"> > [% ELSE %] > <label for="relationship">Relationship: </label> > <select class="relationship" name="relationship" id="relationship"> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 2f58cb888c0..c1042825ce2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -118,7 +118,6 @@ function select_user(borrowernumber, borrower, relationship) { > > var guarantor_relationship = $('#relationship').val(); > fieldset.find('.new_guarantor_relationship').first().val( guarantor_relationship ); >- $('#relationship').find('option:eq(0)').prop('selected', true); > > fieldset.find('.guarantor-details').first().attr( 'data-borrowernumber', borrowernumber ); > >-- >2.39.2
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 31470
:
139826
|
139939
|
144570
|
167432
|
167433
|
167842
|
167843
|
171946
| 171947