From 7407f1745e9bd9dffaaff349f5f58c8780b6e6ef Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 20 Dec 2022 04:17:33 +0000 Subject: [PATCH] Bug 32500: Show only relevant message body option for OPAC_REG_VERIFY This patch changes the "Message body" options for the OPAC_REG_VERIFY notice so that only the relevant "borrower_modifications.verification_token" appears as an option. Tables like branches, biblio, biblioitems, items, borrowers, and issues aren't passed to OPAC_REG_VERIFY at processing time. The only table passed is "borrower_modifications", and only the token is the relevant field there. --- tools/letter.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/letter.pl b/tools/letter.pl index d709b2d6e9..bc8e562139 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -283,6 +283,19 @@ sub add_form { push @{$field_selection}, add_fields('problem_reports'); } + if ( $module eq 'members' and $code and $code eq 'OPAC_REG_VERIFY' ){ + $field_selection = [ + { + 'text' => '---BORROWER_MODIFICATIONS---', + 'value' => '' + }, + { + 'value' => 'borrower_modifications.verification_token', + 'text' => 'borrower_modifications.verification_token' + }, + ]; + } + if ( $module eq 'ill' ) { push @{$field_selection}, add_fields('illrequests'); } -- 2.30.2