From 3211fff98fe9847f84e9014af4755db6c26ea3ca Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Wed, 10 Nov 2021 11:34:17 +0100 Subject: [PATCH] Bug 29393: Add a dedicated letters module for add message Signed-off-by: Matthias Le Gac Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- circ/add_message.pl | 3 +-- .../intranet-tmpl/prog/en/includes/members-toolbar.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 7 +++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/circ/add_message.pl b/circ/add_message.pl index 0795775354..d7f8a2dff6 100755 --- a/circ/add_message.pl +++ b/circ/add_message.pl @@ -61,7 +61,6 @@ elsif( $op eq 'cud-add_message' ) { message => $borrower_message, } )->store; - } if ( $message_type eq 'E' ) { @@ -74,7 +73,7 @@ elsif( $op eq 'cud-add_message' ) { if ( $letter_code ) { $letter = C4::Letters::GetPreparedLetter( - module => 'members', + module => 'add_message', letter_code => $letter_code, lang => $patron->lang, tables => { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc index 117658ee17..072f705b52 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -153,7 +153,7 @@ [% END %] - [% patron_letters = NoticeTemplates.GetByModule( 'members' ) %] + [% patron_letters = NoticeTemplates.GetByModule( 'add_message' ) %] [% IF patron_letters %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 47606c98f0..e49333fdda 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -181,6 +181,7 @@
  • Suggestions
  • Point of sale
  • Reports
  • +
  • Add message
  • @@ -241,6 +242,7 @@ [% CASE 'suggestions' %]Suggestions [% CASE 'pos' %]Point of sale [% CASE 'report' %]Reports + [% CASE 'add_message' %]Add message [% CASE %][% lette.module | html %] [% END %] @@ -434,6 +436,11 @@ [% ELSE %] [% END %] + [% IF ( module == "add_message" ) %] + + [% ELSE %] + + [% END %]
  • -- 2.39.5