Bugzilla – Attachment 66400 Details for
Bug 17374
Make use of fields from syspref 'DefaultPatronSearchFields' in patron search fields dropdown
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17374 - QA Followup
Bug-17374---QA-Followup.patch (text/plain), 5.64 KB, created by
Nick Clemens (kidclamp)
on 2017-08-23 23:40:38 UTC
(
hide
)
Description:
Bug 17374 - QA Followup
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-08-23 23:40:38 UTC
Size:
5.64 KB
patch
obsolete
>From 9d99bbb5eb388441afb4794c55ab6a25a3b6187d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 23 Aug 2017 23:37:58 +0000 >Subject: [PATCH] Bug 17374 - QA Followup > >Skip invlid field names >Add fields to sidebar >--- > .../prog/en/includes/patron-search.inc | 1 + > .../prog/en/includes/patronfields.inc | 1 + > .../prog/en/modules/members/member.tt | 60 ++++------------------ > 3 files changed, 13 insertions(+), 49 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index a87fb55..a3000de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -24,6 +24,7 @@ > [% search_options = default_fields.merge(pref_fields).unique %] > [% FOREACH s_o IN search_options %] > [% display_name = PROCESS patron_fields name=s_o %] >+ [% NEXT IF display_name.length == 5 %] > [% IF searchfieldstype == s_o %] > <option selected="selected" value=[% s_o %]>[% display_name %]</option> > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc >index e5bbf3d..ef8f777 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc >@@ -70,5 +70,6 @@ > [%- CASE 'updated_on' -%]<span>Last updated</span> > [%- CASE 'lastseen' -%]<span>Last seen</span> > [%- CASE 'checkprevcheckout' -%]<span>Check previous checkout</span> >+ [%- CASE DEFAULT -%] > [%- END -%] > [%- END -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index f8f2471..a9fd67e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -426,55 +426,17 @@ function filterByFirstLetterSurname(letter) { > <li> > <label for="searchfieldstype_filter">Search fields:</label> > <select name="searchfieldstype" id="searchfieldstype_filter"> >- [% IF searchfieldstype == "standard" %] >- <option selected="selected" value='standard'>Standard</option> >- [% ELSE %] >- <option value='standard'>Standard</option> >- [% END %] >- [% IF searchfieldstype == "surname" %] >- <option selected="selected" value='surname'>Surname</option> >- [% ELSE %] >- <option value='surname'>Surname</option> >- [% END %] >- [% IF searchfieldstype == "email" %] >- <option selected="selected" value='email'>Email</option> >- [% ELSE %] >- <option value='email'>Email</option> >- [% END %] >- [% IF searchfieldstype == "borrowernumber" %] >- <option selected="selected" value='borrowernumber'>Borrower number</option> >- [% ELSE %] >- <option value='borrowernumber'>Borrower number</option> >- [% END %] >- [% IF searchfieldstype == "userid" %] >- <option selected="selected" value='userid'>Username</option> >- [% ELSE %] >- <option value='userid'>Username</option> >- [% END %] >- [% IF searchfieldstype == "phone" %] >- <option selected="selected" value='phone'>Phone number</option> >- [% ELSE %] >- <option value='phone'>Phone number</option> >- [% END %] >- [% IF searchfieldstype == "address" %] >- <option selected="selected" value='address'>Street address</option> >- [% ELSE %] >- <option value='address'>Street address</option> >- [% END %] >- [% IF searchfieldstype == "dateofbirth" %] >- <option selected="selected" value='dateofbirth'>Date of birth</option> >- [% ELSE %] >- <option value='dateofbirth'>Date of birth</option> >- [% END %] >- [% IF searchfieldstype == "sort1" %] >- <option selected="selected" value='sort1'>Sort field 1</option> >- [% ELSE %] >- <option value='sort1'>Sort field 1</option> >- [% END %] >- [% IF searchfieldstype == "sort2" %] >- <option selected="selected" value='sort2'>Sort field 2</option> >- [% ELSE %] >- <option value='sort2'>Sort field 2</option> >+ [% pref_fields = Koha.Preference('DefaultPatronSearchFields').split(',') %] >+ [% default_fields = [ 'standard', 'surname', 'email', 'borrowernumber', 'userid', 'phone', 'address', 'dateofbirth', 'sort1', 'sort2' ] %] >+ [% search_options = default_fields.merge(pref_fields).unique %] >+ [% FOREACH s_o IN search_options %] >+ [% display_name = PROCESS patron_fields name=s_o %] >+ [% NEXT IF display_name.length == 5 %] >+ [% IF searchfieldstype == s_o %] >+ <option selected="selected" value=[% s_o %]>[% display_name %]</option> >+ [% ELSE %] >+ <option value=[% s_o %]>[% display_name %]</option> >+ [% END %] > [% END %] > </select> > </li> >-- >2.1.4
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 17374
:
56921
|
56931
|
56958
|
58239
|
66400
|
70226
|
71536
|
71597
|
71598
|
71599
|
71600
|
74828
|
93226
|
94831
|
94876
|
94890
|
94891
|
94892
|
96341
|
96342
|
96343
|
96679
|
98106
|
98478
|
100436
|
100437
|
100438
|
100439