From e30bd50f0ea73886b3a1f633a9e759baaf78200b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 28 Mar 2022 15:54:38 +0100 Subject: [PATCH] Bug 24975: Add to Koha::UI::Form::Builder::Item --- Koha/UI/Form/Builder/Item.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Koha/UI/Form/Builder/Item.pm b/Koha/UI/Form/Builder/Item.pm index 3a478ee05e0..8ff8363c609 100644 --- a/Koha/UI/Form/Builder/Item.pm +++ b/Koha/UI/Form/Builder/Item.pm @@ -24,6 +24,7 @@ use C4::ClassSource qw( GetClassSources ); use Koha::Biblios; use Koha::DateUtils qw( dt_from_string ); +use Koha::I18N; use Koha::Libraries; =head1 NAME @@ -208,16 +209,16 @@ sub generate_subfield_form { push @authorised_values, ""; my $itemtypes; if ($branch_limit) { - $itemtypes = Koha::ItemTypes->search_with_localization( + $itemtypes = Koha::ItemTypes->search( { branchcode => $branch_limit } ); } else { - $itemtypes = Koha::ItemTypes->search_with_localization; + $itemtypes = Koha::ItemTypes->search; } while ( my $itemtype = $itemtypes->next ) { push @authorised_values, $itemtype->itemtype; $authorised_lib{ $itemtype->itemtype } = - $itemtype->translated_description; + db_t('itemtype', $itemtype->translation_key); } if (!$value && $biblionumber) { -- 2.25.1