From 3ae3981d3c881bbbd136015ae94e91961236d15e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 20 Nov 2020 09:18:26 +0100 Subject: [PATCH] Bug 25583: Disable the "claim returned" button if the feature is disabled It's possible to display the "Return claims" column on the checkout list, even if the feature is disabled. We should disable the link and add an explanation. Test plan: - Make sure ClaimReturnedLostValue is empty - Go to a patron account - Check out an item - Make the claims returned column visible in the table of checkouts => The button is disabled and a tooltip explains that the feature is disabled Signed-off-by: Kyle M Hall Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index f3cb49611b..45f82d6fcc 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -588,8 +588,10 @@ $(document).ready(function() { if ( oObj.return_claim_id ) { content = '' + oObj.return_claim_created_on_formatted + ''; - } else { + } else if ( ClaimReturnedLostValue ) { content = ' ' + __("Claim returned") + ''; + } else { + content = ' ' + __("Claim returned") + ''; } return content; } -- 2.39.2