Lines 30-36
my $patron = Koha::Patrons->find( $member );
Link Here
|
30 |
my $category_type = $patron->category->category_type; |
30 |
my $category_type = $patron->category->category_type; |
31 |
my $bor = $patron->unblessed; |
31 |
my $bor = $patron->unblessed; |
32 |
if( $category_type eq 'S' ) { |
32 |
if( $category_type eq 'S' ) { |
33 |
$flagsrequired->{'staffaccess'} = 1; |
33 |
$flagsrequired->{'staffaccess'} = 1; |
34 |
} |
34 |
} |
35 |
my ($template, $loggedinuser, $cookie) = get_template_and_user({ |
35 |
my ($template, $loggedinuser, $cookie) = get_template_and_user({ |
36 |
template_name => "members/member-flags.tt", |
36 |
template_name => "members/member-flags.tt", |
Lines 117-130
if ($input->param('newflags')) {
Link Here
|
117 |
my @loop; |
117 |
my @loop; |
118 |
|
118 |
|
119 |
while (my ($bit, $flag) = $sth->fetchrow) { |
119 |
while (my ($bit, $flag) = $sth->fetchrow) { |
120 |
my $checked=''; |
120 |
my $checked=''; |
121 |
if ($accessflags->{$flag}) { |
121 |
if ($accessflags->{$flag}) { |
122 |
$checked= 1; |
122 |
$checked= 1; |
123 |
} |
123 |
} |
124 |
|
124 |
|
125 |
my %row = ( bit => $bit, |
125 |
my %row = ( bit => $bit, |
126 |
flag => $flag, |
126 |
flag => $flag, |
127 |
checked => $checked, |
127 |
checked => $checked, |
128 |
); |
128 |
); |
129 |
|
129 |
|
130 |
my @sub_perm_loop = (); |
130 |
my @sub_perm_loop = (); |
Lines 170-176
if ($input->param('newflags')) {
Link Here
|
170 |
if ($#sub_perm_loop > -1) { |
170 |
if ($#sub_perm_loop > -1) { |
171 |
$row{sub_perm_loop} = \@sub_perm_loop; |
171 |
$row{sub_perm_loop} = \@sub_perm_loop; |
172 |
} |
172 |
} |
173 |
push @loop, \%row; |
173 |
push @loop, \%row; |
174 |
} |
174 |
} |
175 |
|
175 |
|
176 |
if ( $category_type eq 'C') { |
176 |
if ( $category_type eq 'C') { |
Lines 178-184
if ($input->param('newflags')) {
Link Here
|
178 |
$template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1; |
178 |
$template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1; |
179 |
$template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; |
179 |
$template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; |
180 |
} |
180 |
} |
181 |
|
181 |
|
182 |
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ ); |
182 |
$template->param( adultborrower => 1 ) if ( $category_type =~ /^(A|I)$/ ); |
183 |
$template->param( picture => 1 ) if $patron->image; |
183 |
$template->param( picture => 1 ) if $patron->image; |
184 |
|
184 |
|
Lines 191-222
if (C4::Context->preference('ExtendedPatronAttributes')) {
Link Here
|
191 |
} |
191 |
} |
192 |
|
192 |
|
193 |
$template->param( |
193 |
$template->param( |
194 |
borrowernumber => $bor->{'borrowernumber'}, |
194 |
borrowernumber => $bor->{'borrowernumber'}, |
195 |
cardnumber => $bor->{'cardnumber'}, |
195 |
cardnumber => $bor->{'cardnumber'}, |
196 |
surname => $bor->{'surname'}, |
196 |
surname => $bor->{'surname'}, |
197 |
firstname => $bor->{'firstname'}, |
197 |
firstname => $bor->{'firstname'}, |
198 |
othernames => $bor->{'othernames'}, |
198 |
othernames => $bor->{'othernames'}, |
199 |
categorycode => $bor->{'categorycode'}, |
199 |
categorycode => $bor->{'categorycode'}, |
200 |
category_type => $category_type, |
200 |
category_type => $category_type, |
201 |
categoryname => $bor->{'description'}, |
201 |
categoryname => $bor->{'description'}, |
202 |
address => $bor->{address}, |
202 |
address => $bor->{address}, |
203 |
address2 => $bor->{'address2'}, |
203 |
address2 => $bor->{'address2'}, |
204 |
streettype => $bor->{streettype}, |
204 |
streettype => $bor->{streettype}, |
205 |
city => $bor->{'city'}, |
205 |
city => $bor->{'city'}, |
206 |
state => $bor->{'state'}, |
206 |
state => $bor->{'state'}, |
207 |
zipcode => $bor->{'zipcode'}, |
207 |
zipcode => $bor->{'zipcode'}, |
208 |
country => $bor->{'country'}, |
208 |
country => $bor->{'country'}, |
209 |
phone => $bor->{'phone'}, |
209 |
phone => $bor->{'phone'}, |
210 |
phonepro => $bor->{'phonepro'}, |
210 |
phonepro => $bor->{'phonepro'}, |
211 |
mobile => $bor->{'mobile'}, |
211 |
mobile => $bor->{'mobile'}, |
212 |
email => $bor->{'email'}, |
212 |
email => $bor->{'email'}, |
213 |
emailpro => $bor->{'emailpro'}, |
213 |
emailpro => $bor->{'emailpro'}, |
214 |
branchcode => $bor->{'branchcode'}, |
214 |
branchcode => $bor->{'branchcode'}, |
215 |
loop => \@loop, |
215 |
loop => \@loop, |
216 |
is_child => ($category_type eq 'C'), |
216 |
is_child => ( $category_type eq 'C' ), |
217 |
RoutingSerials => C4::Context->preference('RoutingSerials'), |
217 |
RoutingSerials => C4::Context->preference('RoutingSerials'), |
218 |
csrf_token => Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ), |
218 |
csrf_token => |
219 |
); |
219 |
Koha::Token->new->generate_csrf( { session_id => scalar $input->cookie('CGISESSID'), } ), |
|
|
220 |
); |
220 |
|
221 |
|
221 |
output_html_with_http_headers $input, $cookie, $template->output; |
222 |
output_html_with_http_headers $input, $cookie, $template->output; |
222 |
|
223 |
|