From 680e267425450824c199b6dbe736972838d8914e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 11 May 2022 16:13:23 +0100 Subject: [PATCH] Bug 29051: Enable seen renewal in the staff client This patch updates the javascript for the checkouts table to add the checkbox back in for the case where too_unseen is the error returned by CanBookBeRenewed, allowing such issues to be renewed. Signed-off-by: Caroline Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 91a67e3c8acd4d0cad73e01b10569c712b6b4c01) Signed-off-by: Lucas Gass (cherry picked from commit 36e39cab65fbb6fd36754dcd20839814e5386d9b) Signed-off-by: Arthur Suzuki (cherry picked from commit b513d0b03800eb9ac70265d7ff61d2e23fb42d6b) Signed-off-by: Victor Grousset/tuxayo --- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index 19fe7e2174..d6895341a4 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -476,11 +476,9 @@ $(document).ready(function() { span_style = "display: none"; span_class = "renewals-allowed"; } else if ( oObj.can_renew_error == "too_unseen" ) { - msg += "" + msg += "" + __("Must be renewed at the library") + ""; - - span_style = "display: none"; span_class = "renewals-allowed"; } else if ( oObj.can_renew_error == "restriction" ) { msg += "" @@ -559,7 +557,7 @@ $(document).ready(function() { var can_force_renew = ( oObj.onsite_checkout == 0 ) && ( oObj.can_renew_error != "on_reserve" || (oObj.can_renew_error == "on_reserve" && AllowRenewalOnHoldOverride)) ? true : false; - var can_renew = ( oObj.renewals_remaining > 0 && !oObj.can_renew_error ); + var can_renew = ( oObj.renewals_remaining > 0 && ( !oObj.can_renew_error || oObj.can_renew_error == "too_unseen" )); content += ""; if ( can_renew || can_force_renew ) { content += "" + oObj.renewals_count + ""; -- 2.39.5