Bug 36947: (QA follow-up) Fix locale-list to show selected values
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
c0546d4c22
commit
01543503ce
|
|
@ -126,7 +126,13 @@ sub _get_chunk {
|
|||
|
||||
# Dynamic locale detection for facet sorting using Koha::I18N
|
||||
require Koha::I18N;
|
||||
$chunk->{'CHOICES'} = Koha::I18N::available_locales();
|
||||
my $locales = Koha::I18N::available_locales();
|
||||
foreach my $locale (@$locales) {
|
||||
if ( $locale->{value} && $value && $locale->{value} eq $value ) {
|
||||
$locale->{selected} = 1;
|
||||
}
|
||||
}
|
||||
$chunk->{'CHOICES'} = $locales;
|
||||
$chunk->{'type'} = 'select';
|
||||
} elsif ( $options{'choices'} ) {
|
||||
my $add_blank;
|
||||
|
|
|
|||
Loading…
Reference in New Issue