Bug 11263: Use all languages instead of just the translated ones

This patch produces the same dropdown list as the one in the adv search.
With this way, it won't be necessary to install additional templates to
fill the locale list.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Jonathan Druart 2013-12-12 11:27:26 +01:00 committed by Galen Charlton
parent 98309138a6
commit 507944e41b
2 changed files with 7 additions and 6 deletions

View File

@ -215,10 +215,10 @@ if ($op eq 'addsubscription') {
my $languages = [ map {
{
language => $_->{language},
description => $_->{native_description} || $_->{language}
language => $_->{iso639_2_code},
description => $_->{language_description} || $_->{language}
}
} @{ C4::Languages::getTranslatedLanguages() } ];
} @{ C4::Languages::getAllLanguages() } ];
$template->param( locales => $languages );

View File

@ -105,12 +105,13 @@ if($op && ($op eq 'new' || $op eq 'modify')) {
my @frequencies = GetSubscriptionFrequencies();
my @subtypes;
push @subtypes, { value => $_ } for (qw/ issues weeks months /);
my $languages = [ map {
{
language => $_->{language},
description => $_->{native_description} || $_->{language}
language => $_->{iso639_2_code},
description => $_->{language_description} || $_->{language}
}
} @{ C4::Languages::getTranslatedLanguages() } ];
} @{ C4::Languages::getAllLanguages() } ];
$template->param(
$op => 1,