https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18884 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- (In reply to Mark Alexander from comment #1)
I ran into this problem today on 17.05.01.
The workaround I came up with was to create a library group, and add to this group the specific library I wanted to search. Then in the search form, I selected that library group.
I'm not familiar with the code, but I did take a quick look, and couldn't see a way to fix this just in advsearch.tt. The language limit is handled correctly there through the use of a FOREACH loop that inserts "ln,rtrn:" in front of the language name in the option value. But the branch limit is handled by a call to options_for_libraries. That function, in html_helpers.inc, doesn't seem to allow a prefix to be inserted in front of the option value.
So it looks like the branch selector in advsearch.tt should have a name other than "limit", and in search.pl this param should be handled separately from the other "limit" params, by inserting the prefix "limit=holdingbranch:" in front of the branch name.
Of course, due to my ignorance, I could be entirely wrong about all this :-) .
It's definitely a regression introduced by Bug 15758: - [% FOREACH branchloo IN branchloop %] - [% IF ( branchloo.selected ) %] - <option value="branch:[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option> - [% ELSE %] - <option value="branch:[% branchloo.value %]">[% branchloo.branchname %]</option> - [% END %] - [% END %] + [% PROCESS options_for_libraries libraries => Branches.all() %] I think I'll just write a patch to add an optional prefix to html_helpers.inc to restore the original syntax. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.