Bug 36163: Usage statistics - Not possible to select a country

Site: .../cgi-bin/koha/admin/usage_statistics.pl

If you try to select a country, you get an error:
==
The value of your system preference 'UsageStatsCountry' is not valid (Germany). Please select a valid one.
==

It doesn't matter which country you chose, no country is valid.

Test plan:
==========
1. Select a country for UsageStatsCountry system preference.
2. Go to http://<your addr>:8081/cgi-bin/koha/admin/usage_statistics.pl
3. Confirm the issue.
4. Apply the patch ; restart_all.
5. Repeat p. 2.
6. Confirm that the issue has been solved.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Janusz Kaczmarek 2025-01-20 14:35:56 +00:00 committed by Katrin Fischer
parent 804394e530
commit 3d844e774d
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 2 deletions

View File

@ -100,11 +100,12 @@
<select name="UsageStatsCountry" id="UsageStatsCountry">
<option value="">&nbsp;</option>
[% FOREACH country IN country_strings.split(',') %]
[% country = country.trim %]
[% IF country == UsageStatsCountry %]
<option value="[% country.trim | html %]" selected="selected">[% country.trim | html %]</option>
<option value="[% country | html %]" selected="selected">[% country | html %]</option>
[% SET IsUsageStatsCountryValid = 1 %]
[% ELSE %]
<option value="[% country.trim | html %]">[% country.trim | html %]</option>
<option value="[% country | html %]">[% country | html %]</option>
[% END %]
[% END %]
</select>