Bug 40042: Add default value 0 for index var in search_indexes.inc

In koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc some calls do not set 'index' var generating idx="idx_".
Set 0 has default value.

Test plan :
1) Enable system preference 'IntranetCatalogSearchPulldown'
2) Go to catalogue advanced search
3) Look HTML source and check you see:
     <select class="advsearch" name="idx" id="idx_0">
     <select class="advsearch" name="idx" id="idx_1">
     <select class="advsearch" name="idx" id="idx_2">
4) In page page toolbar, click 'Search catalog'
5) Click on 'More options' icon
6) Look HTML source of this part and check you see:
      <select class="advsearch" name="idx" id="idx_0">
Without patch you see:
      <select class="advsearch" name="idx" id="idx_">

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Fridolin Somers 2025-06-02 10:00:32 +02:00 committed by Lucas Gass
parent 727b9d2dde
commit 0d39336f71
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,7 @@
[% USE Koha %]
[% UNLESS index %]
[% SET index = 0 %]
[% END %]
[% SET select_id = refiner ? 'refiner_idx_' _ index : 'idx_' _ index %]
<select class="advsearch" name="idx" id="[% select_id | html %]">
[% IF ms_kw %]