-####################
-## Initializing selection lists
-
-#branch display management
-my $branchfilter = ($displayby ne "branchcode") ? $input->param('branchcode') : '';
-my $onlymine =
- C4::Context->preference('IndependentBranches')
- && C4::Context->userenv
- && !C4::Context->IsSuperLibrarian()
- && C4::Context->userenv->{branch};
-my $branches = GetBranches($onlymine);
-my @branchloop;
-
-foreach my $thisbranch ( sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches ) {
- my %row = (
- value => $thisbranch,
- branchname => $branches->{$thisbranch}->{'branchname'},
- selected => ($branchfilter and $branches->{$thisbranch}->{'branchcode'} eq $branchfilter ) || ( $$suggestion_ref{'branchcode'} and $branches->{$thisbranch}->{'branchcode'} eq $$suggestion_ref{'branchcode'} )
- );
- push @branchloop, \%row;
-}
-$branchfilter=C4::Context->userenv->{'branch'} if ($onlymine && !$branchfilter);
-
-$template->param( branchloop => \@branchloop,
- branchfilter => $branchfilter);
-
-# the index parameter is different for item-level itemtypes
-my $supportlist = GetSupportList();
-
-foreach my $support (@$supportlist) {
- $$support{'selected'} = (defined $$suggestion_ref{'itemtype'})
- ? $$support{'itemtype'} eq $$suggestion_ref{'itemtype'}
- : 0;
- if ( $$support{'imageurl'} ) {
- $$support{'imageurl'} = getitemtypeimagelocation( 'intranet', $$support{'imageurl'} );
- } else {
- delete $$support{'imageurl'};
- }
-}
-$template->param(itemtypeloop=>$supportlist);