Bug 24063: Add Sami language characters to Zebra
[srvgit] / members / housebound.pl
index 64f4c54..4b965d8 100755 (executable)
@@ -28,7 +28,6 @@ use Modern::Perl;
 use CGI;
 use C4::Auth;
 use C4::Context;
-use C4::Members::Attributes qw(GetBorrowerAttributes);
 use C4::Output;
 use DateTime;
 use Koha::DateUtils;
@@ -62,11 +61,8 @@ my $patron = Koha::Patrons->find($borrowernumber);
 output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
 
 # Get supporting cast
-my ( $branch, $category, $houseboundprofile, $visit, $patron_image );
-if ( $patron ) {
-    $patron_image = $patron->image;
-    $branch = Koha::Libraries->new->find($patron->branchcode);
-    $category = Koha::Patron::Categories->new->find($patron->categorycode);
+my ( $houseboundprofile, $visit );
+if ( $patron ) { # FIXME This test is not needed - output_and_exit_if_error handles it
     $houseboundprofile = $patron->housebound_profile;
 }
 if ( $visit_id ) {
@@ -158,24 +154,11 @@ if ( $method eq 'updateconfirm' and $houseboundprofile ) {
 $method = 'update_or_create' if ( !$houseboundprofile );
 
 # Ensure template has all patron details.
-$template->param(%{$patron->unblessed}) if ( $patron );
-
-# Load extended patron attributes if necessary (taken from members/files.pl).
-if ( C4::Context->preference('ExtendedPatronAttributes') and $patron ) {
-    my $attributes = GetBorrowerAttributes($patron->borrowernumber);
-    $template->param(
-        ExtendedPatronAttributes => 1,
-        extendedattributes => $attributes
-    );
-}
+$template->param( patron => $patron );
 
-$template->param( adultborrower => 1 ) if ( $category->category_type eq 'A' || $category->category_type eq 'I' );
 $template->param(
-    picture            => $patron_image,
     housebound_profile => $houseboundprofile,
     visit              => $houseboundvisit,
-    branch             => $branch,
-    category           => $category,
     messages           => \@messages,
     method             => $method,
     choosers           => $choosers,