From 572790cfe727d84763b6ca5e40b5bed70403f57b Mon Sep 17 00:00:00 2001 From: jeremy breuillard Date: Tue, 22 Feb 2022 14:03:08 +0100 Subject: [PATCH] Bug 27123: Add messages to batch patrons modification With this patch you can write or delete circulation messages on the batch patrons modification form Test plan: 1)Go to Home > Tools > Batch patron modification 2)Write one or more card numbers to access the modification form 3)Notice the input you can interact with 4)Apply patch and repeat 1) & 2) 5)Notice the new input 'Message:' which appeared down the form 6)Write a message and choose a type (opac or intranet) 7)Save & notice the new 'Message' column filled up with what you wrote before 8)To delete: back on the modification form - check the checkbox beside the input - save again --- .../prog/en/modules/tools/modborrowers.tt | 22 ++++++++++ tools/modborrowers.pl | 41 ++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) 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 1a69521b97..1dd4b02e1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -34,6 +34,7 @@
+ [% IF ( op == 'show_form' ) %]

Batch patron modification

@@ -223,6 +224,7 @@ Expiry date Circulation note OPAC note + Message Restriction expiration Restriction comment [% FOREACH attrh IN attributes_header %] @@ -259,6 +261,18 @@ [% borrower.dateexpiry | $KohaDates %] [% borrower.borrowernotes | html %] [% borrower.opacnote | html %] + + [% FOREACH patron_message IN borrower.patron_messages %] + [% patron_message.message | html %]
+ + [% IF (patron_message.message_type == 'B') %] + ( OPAC ) + [% ELSE %] + ( Staff ) + [% END %] +

+ [% END %] + [% borrower.debarred | $KohaDates %] [% borrower.debarredcomment | html %] [% FOREACH pa IN borrower.patron_attributes %] @@ -310,6 +324,7 @@ [% CASE 'dateexpiry' %]Expiry date: [% CASE 'borrowernotes' %]Circulation note: [% CASE 'opacnote' %]OPAC note: + [% CASE "message" %]Message: [% CASE 'debarred' %]Restriction expiration: [% CASE 'debarredcomment' %]Restriction comment: [% END %] @@ -317,6 +332,13 @@ [% IF ( field.type == 'text' ) %] [% END %] + [% IF ( field.type == 'message_type' ) %] + + + [% END %] [% IF ( field.type == 'select' ) %] [% IF field.option.size %]