Lines 36-41
use C4::Items;
Link Here
|
36 |
use C4::Members::Attributes qw(GetBorrowerAttributes); |
36 |
use C4::Members::Attributes qw(GetBorrowerAttributes); |
37 |
|
37 |
|
38 |
my $input=new CGI; |
38 |
my $input=new CGI; |
|
|
39 |
my $flagsrequired = { borrowers => 1, updatecharges => 1 }; |
39 |
|
40 |
|
40 |
my $borrowernumber=$input->param('borrowernumber'); |
41 |
my $borrowernumber=$input->param('borrowernumber'); |
41 |
|
42 |
|
Lines 44-50
my $data=GetMember('borrowernumber' => $borrowernumber);
Link Here
|
44 |
my $add=$input->param('add'); |
45 |
my $add=$input->param('add'); |
45 |
|
46 |
|
46 |
if ($add){ |
47 |
if ($add){ |
47 |
if(checkauth($input)) { |
48 |
if ( checkauth( $input, 0, $flagsrequired, 'intranet' ) ) { |
48 |
my $barcode = $input->param('barcode'); |
49 |
my $barcode = $input->param('barcode'); |
49 |
my $itemnum; |
50 |
my $itemnum; |
50 |
if ($barcode) { |
51 |
if ($barcode) { |
Lines 64-70
if ($add){
Link Here
|
64 |
query => $input, |
65 |
query => $input, |
65 |
type => "intranet", |
66 |
type => "intranet", |
66 |
authnotrequired => 0, |
67 |
authnotrequired => 0, |
67 |
flagsrequired => {borrowers => 1, updatecharges => 1}, |
68 |
flagsrequired => $flagsrequired, |
68 |
debug => 1, |
69 |
debug => 1, |
69 |
}); |
70 |
}); |
70 |
|
71 |
|
Lines 74-80
if ($add){
Link Here
|
74 |
$template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; |
75 |
$template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; |
75 |
$template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; |
76 |
$template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; |
76 |
} |
77 |
} |
77 |
|
78 |
|
78 |
$template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' ); |
79 |
$template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' ); |
79 |
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); |
80 |
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); |
80 |
$template->param( picture => 1 ) if $picture; |
81 |
$template->param( picture => 1 ) if $picture; |