From f3d964c6b91b4501bd18d243597f3f9dfd2d2ce6 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 Signed-off-by: Valerie Burnett Signed-off-by: George Williams --- .../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 46ef2f417d8..68b6ef6adee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -60,6 +60,7 @@
[% INCLUDE 'messages.inc' %] + [% IF ( op == 'show_form' ) %]

Batch patron modification

@@ -262,6 +263,7 @@ [% END %] Circulation note OPAC note + Message Restriction expiration Restriction comment [% FOREACH attrh IN attributes_header %] @@ -308,6 +310,18 @@ [% END %] [% borrower.borrowernotes | $raw | html_line_break %] [% 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 %] @@ -360,6 +374,7 @@ [% CASE 'dateexpiry' %]Expiry date: [% CASE 'borrowernotes' %]Circulation note: [% CASE 'opacnote' %]OPAC note: + [% CASE "message" %]Message: [% CASE 'debarred' %]Restriction expiration: [% CASE 'debarredcomment' %]Restriction comment: [% CASE 'password_expiration_date' %]Password expiration date: @@ -368,6 +383,13 @@ [% IF ( field.type == 'text' ) %] [% END %] + [% IF ( field.type == 'message_type' ) %] + + + [% END %] [% IF ( field.type == 'select' ) %] [% IF field.option.size %]