Bug 18789: (follow-up) Pass a Koha::Patron object from returns.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 9 Apr 2018 18:59:32 +0000 (15:59 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 9 Apr 2018 19:15:17 +0000 (16:15 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

circ/returns.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

index 162f8fd..9d04dc1 100755 (executable)
@@ -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},
index f18ea69..ab02473 100644 (file)
         <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" />
                     [% 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>