From 069864d3a20f0b775337d537f31e7618ce43f578 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 22 Jul 2009 16:43:43 -0500 Subject: [PATCH] bug 3436: improve error messages in self-check Improved the error messages displayed to users by web-based self-checkout when a problem with a loan occurs. This changed was sponsored by the Plano Independent School District. Signed-off-by: Galen Charlton --- .../prog/en/modules/sco/sco-main.tmpl | 35 ++++++++++++++++++- opac/sco/sco-main.pl | 16 ++++++--- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl index 132312faec..3bfde993c6 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl @@ -72,7 +72,40 @@ $(document).ready(function() {

Item cannot be checked out.

Sorry, This item cannot be checked out at this station.

Title:

-

Error type:

+

+ + MESSAGE 1: The system does not recognize this barcode. + + MESSAGE 2: You have borrowed too many items and can't check out any more. + + MESSAGE 3: This item is checked out to someone else. + + MESSAGE 4: You cannot renew this item again. + + MESSAGE 5: This item is not for loan. + + MESSAGE 6: You owe the library and cannot borrow. + + MESSAGE 7: This item has been withdrawn from the collection. + + MESSAGE 8: + + MESSAGE 9: This item is reserved for another patron. + + MESSAGE 10: + + MESSAGE 11: Your account has expired. + + MESSAGE 12: Your account has been suspended. + + MESSAGE 13: This card has been declared lost. + + MESSAGE 14: + + MESSAGE 15: + + Please see a member of the library staff. +

" /> diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index c2fc1f35bc..f496e3bd6e 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -86,10 +86,14 @@ elsif ( $op eq "checkout" ) { # FIXME we assume only one error. $template->param( - impossible => $issue_error, - title => $item->{title}, - hide_main => 1, + impossible => $issue_error, + "circ_error_$issue_error" => 1, + title => $item->{title}, + hide_main => 1, ); + if ($issue_error eq 'DEBT') { + $template->param(amount => $impossible->{DEBT}); + } #warn "issue_error: " . $issue_error ; if ( $issue_error eq "NO_MORE_RENEWALS" ) { $return_only = 1; @@ -114,9 +118,11 @@ elsif ( $op eq "checkout" ) { } } elsif ( $confirm_required && !$confirmed ) { #warn "failed confirmation"; + my $issue_error = (keys %$needconfirm)[0]; $template->param( - impossible => (keys %$needconfirm)[0], - hide_main => 1, + impossible => (keys %$needconfirm)[0], + "circ_error_$issue_error" => 1, + hide_main => 1, ); } else { if ( $confirmed || $issuenoconfirm ) { # we'll want to call getpatroninfo again to get updated issues. -- 2.39.5