[% UNLESS ( renew ) %]
<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
- <input type="hidden" name="op" value="checkout" />
+ <input type="hidden" name="op" value="renew" />
<input type="hidden" name="patronid" value="[% patronid | html %]" />
<input type="hidden" name="barcode" value="[% barcode | html %]" />
<input type="hidden" name="confirmed" value="1" />
</form>
[% ELSE %]
<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
- <input type="hidden" name="op" value="checkout" />
+ <input type="hidden" name="op" value="renew" />
<input type="hidden" name="patronid" value="[% patronid | html %]" />
<input type="hidden" name="barcode" value="[% barcode | html %]" />
<input type="hidden" name="confirmed" value="1" />
<input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
<input type="hidden" name="newissues" value="[% newissues | html %]" />
[% IF ISSUE.can_be_renewed %]
- <input type="hidden" name="op" value="checkout" />
+ <input type="hidden" name="op" value="renew" />
<input type="hidden" name="confirmed" value="1" />
[% UNLESS ( ISSUE.renew ) %]
<input type="submit" value="Renew item" name="confirm " class="btn renew" />
my ($doreturn) = AddReturn( $barcode, $branch );
$template->param( returned => $doreturn );
}
-elsif ( $patron and $op eq "checkout" ) {
+elsif ( $patron && ( $op eq 'checkout' || $op eq 'renew' ) ) {
my $impossible = {};
my $needconfirm = {};
( $impossible, $needconfirm ) = CanBookBeIssued(
barcode => $barcode,
);
}
- } elsif ( $needconfirm->{RENEW_ISSUE} ) {
+ } elsif ( $needconfirm->{RENEW_ISSUE} || $op eq 'renew' ) {
if ($confirmed) {
#warn "renewing";
AddRenewal( $borrower->{borrowernumber}, $item->{itemnumber} );