Lines 60-69
if ( $op eq 'add_form' ) {
Link Here
|
60 |
my $itemtype = Koha::ItemTypes->find($itemtype_code); |
60 |
my $itemtype = Koha::ItemTypes->find($itemtype_code); |
61 |
my $imagesets = C4::Koha::getImageSets( checked => ( $itemtype ? $itemtype->imageurl : undef ) ); |
61 |
my $imagesets = C4::Koha::getImageSets( checked => ( $itemtype ? $itemtype->imageurl : undef ) ); |
62 |
my $searchcategory = GetAuthorisedValues("ITEMTYPECAT", ( $itemtype ? $itemtype->searchcategory : '' ) ); |
62 |
my $searchcategory = GetAuthorisedValues("ITEMTYPECAT", ( $itemtype ? $itemtype->searchcategory : '' ) ); |
|
|
63 |
my $translated_languages = C4::Languages::getTranslatedLanguages( undef , C4::Context->preference('template') ); |
64 |
my $nb_of_languages = grep {$_->{group_enabled}} @$translated_languages; |
63 |
$template->param( |
65 |
$template->param( |
64 |
itemtype => $itemtype, |
66 |
itemtype => $itemtype, |
65 |
imagesets => $imagesets, |
67 |
imagesets => $imagesets, |
66 |
searchcategory => $searchcategory, |
68 |
searchcategory => $searchcategory, |
|
|
69 |
can_be_translated => ( $nb_of_languages > 1 ? 1 : 0 ), |
67 |
); |
70 |
); |
68 |
} elsif ( $op eq 'add_validate' ) { |
71 |
} elsif ( $op eq 'add_validate' ) { |
69 |
my $is_a_modif = $input->param('is_a_modif'); |
72 |
my $is_a_modif = $input->param('is_a_modif'); |