From 54e1078dec19ced9f77735cafa39863483ad41ca Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 16 Nov 2018 17:23:14 +0000 Subject: [PATCH] Bug 21854: Use template plugin to display category description Rather than getting the description in the script and passing, we should just use the tmeplate plugin to get the description from the category code. To test: 1 - Find a patron, note their category 2 - Visit Tools - Batch patron modification 3 - Enter barcode of patron above 4 - Note category does not show in the display of patrons to be modified 5 - Apply patch 6 - Reload the page, note the patron category displays 7 - Modify the patron (anything but category) 8 - Check that category still diplays correctly in results Signed-off-by: Pierre-Marc Thibault Signed-off-by: Andreas Roussos Signed-off-by: Marcel de Rooy Signed-off-by: Nick Clemens (cherry picked from commit df68391a5ec2eac05a88373dc10c136c8d057e98) Signed-off-by: Jesse Maseto (cherry picked from commit 391e7f7188472f3399007c836c0605cfc1277a30) Signed-off-by: Fridolin Somers --- .../prog/en/modules/tools/modborrowers.tt | 27 ++++++++++--------- tools/modborrowers.pl | 1 - 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt index dd5277b..afb0dc7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -1,6 +1,7 @@ [% USE Koha %] [% USE KohaDates %] [% USE Branches %] +[% USE Categories %] [% INCLUDE 'doc-head-open.inc'%] Koha › Tools › Batch patron modification [% INCLUDE 'doc-head-close.inc' %] @@ -286,19 +287,19 @@ [% IF ( op == 'show' ) %] [% END %] - [% borrower.cardnumber %] - [% borrower.surname %] - [% borrower.firstname %] - [% Branches.GetName( borrower.branchcode ) %] - [% borrower.category_description %] - [% borrower.city %] - [% borrower.state %] - [% borrower.zipcode %] - [% borrower.country %] - [% borrower.dateenrolled | $KohaDates %] - [% borrower.dateexpiry | $KohaDates %] - [% borrower.borrowernotes %] - [% borrower.opacnote %] + [% borrower.cardnumber | html %] + [% borrower.surname | html %] + [% borrower.firstname | html %] + [% Branches.GetName( borrower.branchcode ) | html %] + [% Categories.GetName(borrower.categorycode) | html %] + [% borrower.city | html %] + [% borrower.state | html %] + [% borrower.zipcode | html %] + [% borrower.country | html %] + [% borrower.dateenrolled | $KohaDates %] + [% borrower.dateexpiry | $KohaDates %] + [% borrower.borrowernotes | html %] + [% borrower.opacnote | html %] [% FOREACH pa IN borrower.patron_attributes %] [% IF ( pa.code ) %] [% pa.code %]=[% pa.value %] diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index ba3562b..fa75c18 100755 --- a/tools/modborrowers.pl +++ b/tools/modborrowers.pl @@ -348,7 +348,6 @@ if ( $op eq 'do' ) { $template->param( borrowers => \@borrowers ); $template->param( attributes_header => \@attributes_header ); - $template->param( borrowers => \@borrowers ); $template->param( errors => \@errors ); } else { -- 1.7.2.5