use C4::Auth;
use C4::Output;
use C4::Members;
-use C4::Members::Attributes qw(GetBorrowerAttributes);
use C4::Debug;
use Koha::DateUtils;
use Koha::Patrons;
use Koha::Patron::Files;
+use Koha::Patron::Categories;
my $cgi = CGI->new;
template_name => "members/files.tt",
query => $cgi,
type => "intranet",
- authnotrequired => 0,
flagsrequired => { borrowers => 'edit_borrowers' },
debug => 1,
}
my $borrowernumber = $cgi->param('borrowernumber');
-my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
+my $logged_in_user = Koha::Patrons->find( $loggedinuser );
my $patron = Koha::Patrons->find($borrowernumber);
output_and_exit_if_error( $cgi, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
else {
my $patron_category = $patron->category;
- $template->param(%{ $patron->unblessed});
+ $template->param( patron => $patron );
my %errors;
}
$template->param(
- categoryname => $patron_category->description,
- );
-
- if (C4::Context->preference('ExtendedPatronAttributes')) {
- my $attributes = GetBorrowerAttributes($borrowernumber);
- $template->param(
- ExtendedPatronAttributes => 1,
- extendedattributes => $attributes
- );
- }
-
- $template->param( picture => 1 ) if $patron->image;
-
- $template->param( adultborrower => 1 )
- if ( $patron_category->category_type eq 'A' || $patron_category->category_type eq 'I' );
-
- $template->param(
files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
->GetFilesInfo(),