Browse Source

Bug 18251: (QA follow-up) Add alerts for all SCO actions

To test:

Add sound alerts for sco-alert-warning
Test various actions (return,renew) and verify success/failure notices
and sounds
Note additional classes (return,renew,issue) to allow for more
specificity of sounds alerts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
19.05.x
Nick Clemens 7 years ago
committed by root
parent
commit
eb62686630
  1. 22
      koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
  2. 3
      opac/sco/sco-main.pl

22
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt

@ -39,6 +39,7 @@
[% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
<div class="alert">
<span class="sco-alert-warning noissue"></span>
<h3>Item cannot be checked out.</h3>
<p>Sorry, this item cannot be checked out at this station.</p>
[% IF ( title ) %]
@ -102,6 +103,7 @@
[% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
<div class="alert"><h3>Please confirm the checkout:</h3>
<span class="sco-alert-warning confirm"></span>
[% IF ( confirm_renew_issue ) %]
<p>This item is already checked out to you.</p>
[% END %]
@ -149,6 +151,7 @@
[% IF ( nopermission ) %]
<!-- This is what is displayed if user doesn't have permission -->
<div class="alert">
<span class="sco-alert-warning nopermission"></span>
<h3>Access denied</h3>
<p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
</div>
@ -157,6 +160,7 @@
[% IF ( different_ip ) %]
<!-- This is what is displayed if user doesn't have permission -->
<div class="alert">
<span class="sco-alert-warning sessionlost"></span>
<h3>Session lost</h3>
<p>You are accessing self-checkout from a different IP address! please log in again.</p>
</div>
@ -165,16 +169,32 @@
[% IF ( invalid_username_or_password ) %]
<!-- This is what is displayed if user doesn't have permission -->
<div class="alert">
<span class="sco-alert-warning notfound"></span>
<h3>Record not found</h3>
<p>Your userid was not found in the database. Please try again.</p>
</div>
[% END %]
[% IF ( issued ) %]
<span class="sco-alert-success"></span>
<span class="sco-alert-success issue"></span>
<div class="alert alert-info">
<p>Item checked out</p>
</div>
[% ELSIF ( renewed ) %]
<span class="sco-alert-success renew"></span>
<div class="alert alert-info">
<p>Item renewed</p>
</div>
[% ELSIF ( returned == 0 ) %]
<span class="sco-alert-warning return"></span>
<div class="alert alert-info">
<p>Item not checked in: please see circulation staff for assistance</p>
</div>
[% ELSIF ( returned == 1 ) %]
<span class="sco-alert-success return"></span>
<div class="alert alert-info">
<p>Item checked in</p>
</div>
[% END %]

3
opac/sco/sco-main.pl

@ -124,10 +124,12 @@ my $return_only = 0;
#warn "issuer cardnumber: " . $issuer->{cardnumber};
#warn "patron cardnumber: " . $borrower->{cardnumber};
if ($op eq "logout") {
$template->param( loggedout => 1 );
$query->param( patronid => undef, patronlogin => undef, patronpw => undef );
}
elsif ( $op eq "returnbook" && $allowselfcheckreturns ) {
my ($doreturn) = AddReturn( $barcode, $branch );
$template->param( returned => $doreturn );
}
elsif ( $patron and $op eq "checkout" ) {
my $impossible = {};
@ -177,6 +179,7 @@ elsif ( $patron and $op eq "checkout" ) {
#warn "renewing";
AddRenewal( $borrower->{borrowernumber}, $item->{itemnumber} );
push @newissueslist, $barcode;
$template->param( renewed => 1 );
} else {
#warn "renew confirmation";
$template->param(

Loading…
Cancel
Save