# Getting the messages
my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber});
$template->param( %{$borrower} );
-my $attributes = GetBorrowerAttributes($borrowernumber);
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+ my $attributes = GetBorrowerAttributes($borrowernumber);
+ $template->param(
+ ExtendedPatronAttributes => 1,
+ extendedattributes => $attributes
+ );
+}
$template->param(
QUEUED_MESSAGES => $queued_messages,
sentnotices => 1,
branchname => GetBranchName($borrower->{'branchcode'}),
categoryname => $borrower->{'description'},
- extendedattributes => $attributes,
+ activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
);
output_html_with_http_headers $input, $cookie, $template->output;