Bugzilla – Attachment 167842 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: Add id "relationship" to memberentrygen.tt, change id "relationship" in auth-finder-search.inc
Bug-31470-Add-id-relationship-to-memberentrygentt-.patch (text/plain), 4.40 KB, created by
Owen Leonard
on 2024-06-18 13:18:12 UTC
(
hide
)
Description:
Bug 31470: Add id "relationship" to memberentrygen.tt, change id "relationship" in auth-finder-search.inc
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-06-18 13:18:12 UTC
Size:
4.40 KB
patch
obsolete
>From 05b9fec2aaee10c2adcc0b406f003e86af760552 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Wed, 14 Dec 2022 12:08:33 +0200 >Subject: [PATCH] Bug 31470: Add id "relationship" to memberentrygen.tt, change > id "relationship" in auth-finder-search.inc > >In members.js line 112 variable guarantor_relationship is selected >with id "relationship". However id "relationship" is used in >auth-finder-search.inc, not in memberentrygen.tt. > >One way to see what kind of effect incorrect selector has (and how I >originally stumbled into this), is to add into "IntranetUserJS" a line >which changes non-patron guarantors relationship default selected value >as other than empty. Script has to change "relationship" instead of >"new_guarantor_relationship" because selector input for patron >guarantors relationship actually uses default selected value from >non-patron guarantors relationship. > >This patch changes two things. Firstly it adds id "relationship" to >memberentrygen.tt so that member.js can fetch correct value >to variable guarantor_relatioship. Secondly it changes id "relationship" >in auth-finder-search.tt as "special_relationship" to avoid confusion. > >To test memberentrygen.tt: >1. Make sure you have some value(s) in syspref "borrowerRelationship" > e.g. "guarantor". >2. Add following line to "IntranetUseJS": $('.relationship > option:eq(1)').attr('selected', 'selected'); >3. Add guarantee patron and note that non-patron guarantors relationship > is now "guarantor". >4. Add patron guarantor and note that relationship value is empty. >5. Apply this patch and refresh page. >6. Repeat step 4. > => Note that now relationship value is "guarantor". > >To test auth-finder-search.inc: >1. Add authority e.g. Chronological Term >2. Modify field 551$a, click "Tag editor" icon from right >3. Searc pop-up is opened. > => Make sure that field "Special relationship" is highlighted when > you hover mouse over label. > => Make sure that after performing a search, search value in > "Special relationship" field persists. > >Sponsored-by: Koha-Suomi Oy >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../intranet-tmpl/prog/en/includes/auth-finder-search.inc | 4 ++-- > .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >index fe94cf0f8b..cc2624895b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >@@ -141,8 +141,8 @@ > <fieldset class="rows"><legend>Relationship information</legend> > <ol> > <li> >- <label for="relationship">Special relationship: </label> >- <select name="relationship" id="relationship"> >+ <label for="special_relationship">Special relationship: </label> >+ <select name="relationship" id="special_relationship"> > [% selected=relationship | html %] > [% PROCESS selectoptionopen value='' %]None specified</option> > [% IF Koha.Preference('marcflavour') == 'MARC21' %] >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 6877ef453f..6b4bbacfca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -701,7 +701,7 @@ legend.collapsed i.fa.fa-caret-down::before { > <select class="relationship" name="relationship" required="required"> > [% ELSE %] > <label for="relationship">Relationship: </label> >- <select class="relationship" name="relationship"> >+ <select class="relationship" name="relationship" id="relationship"> > [% END %] > <option value=""></option> > [% FOREACH pr IN possible_relationships.split('\|') %] >-- >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