Bug 18789: (follow-up) Pass a Koha::Patron object from returns.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-04-09 15:59:32 -03:00
parent a2cccbd231
commit 76eb3a0549
2 changed files with 3 additions and 8 deletions

View File

@ -399,7 +399,6 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) {
my $patron = Koha::Patrons->find( $reserve->{'borrowernumber'} );
my $name = $patron->surname . ", " . $patron->title . " " . $patron->firstname;
$template->param(
wname => $name,
patron => $patron,
);
}
@ -433,10 +432,9 @@ if ( $messages->{'ResFound'}) {
$template->param(
# FIXME The full patron object should be passed to the template
found => 1,
name => $patron->surname . ", " . $patron->title . " " . $patron->firstname,
patron => $patron,
barcode => $barcode,
destbranch => $reserve->{'branchcode'},
borrowernumber => $reserve->{'borrowernumber'},
itemnumber => $reserve->{'itemnumber'},
reservenotes => $reserve->{'reservenotes'},
reserve_id => $reserve->{reserve_id},

View File

@ -326,7 +326,7 @@
<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a></caption>
<tr>
<th>Hold for:</th>
<td>[% name %]</td>
<td>[% INCLUDE 'patron-title.inc' patron=patron %]</td>
</tr>
</table>
<form method="post" action="returns.pl"><input type="submit" value="OK" />
@ -368,10 +368,7 @@
[% END %]
<h5>Hold for:</h5>
<li>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">
[% patron.surname %], [% patron.firstname %]
</a>
([% patron.cardnumber %])
[% INCLUDE 'patron-title.inc' patron=patron %]
<span class="patron-category"> - [% patron.category.description %]</span>
</li>