Bug 7758 - Koha allowing LOST items to check out without alert

Adds a confirmation alert when issuing an item that has
been marked as lost.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
passes tests, works as advertiesd

Tested:
- checking out an item that is marked lost performs all usual lost operations
- checking out an item that is marked lost prompts for confirmation

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Kyle M Hall 2012-04-05 11:16:47 -04:00 committed by Paul Poulain
parent 12027e0cb9
commit 08cee791a7
2 changed files with 9 additions and 1 deletions

View File

@ -36,7 +36,7 @@ use C4::Message;
use C4::Debug;
use C4::Branch; # GetBranches
use C4::Log; # logaction
use C4::Koha qw(GetAuthorisedValueByCode);
use Data::Dumper;
use Koha::DateUtils;
use Koha::Calendar;
@ -848,6 +848,9 @@ sub CanBookBeIssued {
{
$issuingimpossible{RESTRICTED} = 1;
}
if ( $item->{'itemlost'} ) {
$needsconfirmation{ITEM_LOST} = GetAuthorisedValueByCode( 'LOST', $item->{'itemlost'} );
}
if ( C4::Context->preference("IndependantBranches") ) {
my $userenv = C4::Context->userenv;
if ( ($userenv) && ( $userenv->{flags} % 2 != 1 ) ) {

View File

@ -275,9 +275,14 @@ function refocus(calendar) {
[% IF ( NOT_FOR_LOAN_FORCING ) %]
<li>Item is normally not for loan. Check out anyway?</li>
[% END %]
[% IF ( USERBLOCKEDOVERDUE ) %]
<li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s). Check out anyway?</li>
[% END %]
[% IF ( ITEM_LOST ) %]
<li>This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?</li>
[% END %]
</ul>
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">