-if ( $searchfieldstype eq "dateofbirth" ) {
- $searchmember = output_pref({dt => dt_from_string($searchmember), dateformat => 'iso', dateonly => 1});
-}
-
-my $branches = C4::Branch::GetBranches;
-my @branches_loop;
-if ( C4::Branch::onlymine ) {
- my $userenv = C4::Context->userenv;
- my $branch = C4::Branch::GetBranchDetail( $userenv->{'branch'} );
- push @branches_loop, {
- value => $branch->{branchcode},
- branchcode => $branch->{branchcode},
- branchname => $branch->{branchname},
- selected => 1
- }
-} else {
- foreach ( sort { lc($branches->{$a}->{branchname}) cmp lc($branches->{$b}->{branchname}) } keys %$branches ) {
- my $selected = 0;
- $selected = 1 if($patron->{branchcode} and $patron->{branchcode} eq $_);
- push @branches_loop, {
- value => $_,
- branchcode => $_,
- branchname => $branches->{$_}->{branchname},
- selected => $selected
- };
- }
-}
-
-my @categories = C4::Category->all;
-if ( $patron->{categorycode} ) {
- foreach my $category ( grep { $_->{categorycode} eq $patron->{categorycode} } @categories ) {
- $category->{selected} = 1;
- }
-}
-