From 469f963551d0901dc25944899dcf89b811a6f6fd Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 13 Mar 2017 14:30:42 +0000 Subject: [PATCH] Bug 18251 - SCO alerts - need a trigger for successful checkouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds simple text and a div to allow for sounds to be configured upon successful SCO checkout To test: 1 - Enable sco module 2 - Enable AudioAlerts 3 - Define alert with Selector: .sco-alert-success Sound:http://localhost:8081/intranet-tmpl/prog/sound/opening.ogg 4 - Checkout to patron using SCO 5 - Note only feedback is a addition of item to checkouts list 6 - Apply patch 7 - Checkout ot patron via SCO 8 - You should hear the sound specified above 9 - You should also see a note: Item checked out Followed test plan, works as expected. (Works with external sound only, see Bug 16732) Signed-off-by: Marc VĂ©ron --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 5 +++++ opac/sco/sco-main.pl | 1 + 2 files changed, 6 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index d97c5f1..c6aee1d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -160,6 +160,11 @@ [% END %] + [% IF ( issued ) %] + +

Item checked out

+ [% END %] + [% UNLESS ( hide_main ) %] diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index fadb633..bd29126 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -201,6 +201,7 @@ elsif ( $op eq "checkout" ) { if ( $confirmed || $issuenoconfirm ) { # we'll want to call getpatroninfo again to get updated issues. # warn "issuing book?"; AddIssue( $borrower, $barcode ); + $template->param( issued => 1 ); # ($borrower, $flags) = getpatroninformation(undef,undef, $patronid); # $template->param( # patronid => $patronid, -- 2.1.4