Lines 75-111
if ( $searchfieldstype eq "dateofbirth" ) {
Link Here
|
75 |
$searchmember = output_pref({dt => dt_from_string($searchmember), dateformat => 'iso', dateonly => 1}); |
75 |
$searchmember = output_pref({dt => dt_from_string($searchmember), dateformat => 'iso', dateonly => 1}); |
76 |
} |
76 |
} |
77 |
|
77 |
|
78 |
my $branches = C4::Branch::GetBranches; |
|
|
79 |
my @branches_loop; |
80 |
if ( C4::Branch::onlymine ) { |
81 |
my $userenv = C4::Context->userenv; |
82 |
my $branch = C4::Branch::GetBranchDetail( $userenv->{'branch'} ); |
83 |
push @branches_loop, { |
84 |
value => $branch->{branchcode}, |
85 |
branchcode => $branch->{branchcode}, |
86 |
branchname => $branch->{branchname}, |
87 |
selected => 1 |
88 |
} |
89 |
} else { |
90 |
foreach ( sort { lc($branches->{$a}->{branchname}) cmp lc($branches->{$b}->{branchname}) } keys %$branches ) { |
91 |
my $selected = 0; |
92 |
$selected = 1 if($patron->{branchcode} and $patron->{branchcode} eq $_); |
93 |
push @branches_loop, { |
94 |
value => $_, |
95 |
branchcode => $_, |
96 |
branchname => $branches->{$_}->{branchname}, |
97 |
selected => $selected |
98 |
}; |
99 |
} |
100 |
} |
101 |
|
102 |
my @categories = C4::Category->all; |
103 |
if ( $patron->{categorycode} ) { |
104 |
foreach my $category ( grep { $_->{categorycode} eq $patron->{categorycode} } @categories ) { |
105 |
$category->{selected} = 1; |
106 |
} |
107 |
} |
108 |
|
109 |
$template->param( 'alphabet' => C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' ); |
78 |
$template->param( 'alphabet' => C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' ); |
110 |
|
79 |
|
111 |
my $view = $input->request_method() eq "GET" ? "show_form" : "show_results"; |
80 |
my $view = $input->request_method() eq "GET" ? "show_form" : "show_results"; |
Lines 113-120
my $view = $input->request_method() eq "GET" ? "show_form" : "show_results";
Link Here
|
113 |
$template->param( |
82 |
$template->param( |
114 |
patron_lists => [ GetPatronLists() ], |
83 |
patron_lists => [ GetPatronLists() ], |
115 |
searchmember => $searchmember, |
84 |
searchmember => $searchmember, |
116 |
branchloop => \@branches_loop, |
|
|
117 |
categories => \@categories, |
118 |
branchcode => $patron->{branchcode}, |
85 |
branchcode => $patron->{branchcode}, |
119 |
categorycode => $patron->{categorycode}, |
86 |
categorycode => $patron->{categorycode}, |
120 |
searchtype => $input->param('searchtype') || 'start_with', |
87 |
searchtype => $input->param('searchtype') || 'start_with', |