From 9779098bd67de93b96d8b9edd222fa5411b3987b Mon Sep 17 00:00:00 2001
From: David Cook <dcook@prosentient.com.au>
Date: Wed, 23 Dec 2020 04:41:58 +0000
Subject: [PATCH] Bug 27292: Add TablesSettings directive to fix
 columns_settings_borrowers_table

This patch adds the USE TablesSettings directive which allows the plugin
to be invoked to fill the columns_settings_borrowers_table variable.

Test plan:
0. Do not apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/reserve/request.pl?borrowernumber=51&biblionumber=29
2. View source on the page and note columns_settings_borrowers_table has no value assigned
2. Apply the patch
3. In a new tab, go to http://localhost:8081/cgi-bin/koha/reserve/request.pl?borrowernumber=51&biblionumber=29
4. Note that nothing has changed on the surfeace
5. View source ont he page and note columns_settings_borrowers_table now has a value assigned

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
---
 koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
index 1fa9952a89..d8b8ae07a3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
@@ -8,6 +8,7 @@
 [% USE ItemTypes %]
 [% USE AuthorisedValues %]
 [% USE Price %]
+[% USE TablesSettings %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% UNLESS ( multi_hold ) %]
@@ -1013,7 +1014,7 @@
             itemAlreadyOnHold: _("Patron already has hold for this item"),
             cannotBeTransferred: _("Cannot be transferred to pickup library")
         }
-        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
+        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %];
 
         $(document).ready(function() {
             $('#cancellation-reason-fieldset').hide();
-- 
2.20.1