From 83b251e91d418e85d236c945e0edd52e601a7513 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 25 Sep 2023 22:11:39 -1000 Subject: [PATCH] Bug 34910: (follow-up) alert in patron details MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The anonymous patron details page should show an alert message. 1) Configure an existing borrowernumber in system preference 'AnonymousPatron' 2) Go to details page of this borrower : /cgi-bin/koha/members/moremember.pl?borrowernumber=x 3) Check you see alert 'This is the anonymous patron.' Signed-off-by: Kelly McElligott Signed-off-by: Johanna Miettunen Signed-off-by: Päivi Knuutinen Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit a8e770d9c49a88fbfd46c27b31d3eb2a413a1618) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 4 ++++ members/moremember.pl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index bad172ba54..ba6ba163fd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -52,6 +52,10 @@ [% INCLUDE 'members-toolbar.inc' %] + [% IF is_anonymous %] +
This is the anonymous patron.
+ [% END %] + [% IF ( error ) %]
[% IF ( error == 'CANT_DELETE_STAFF' ) %] diff --git a/members/moremember.pl b/members/moremember.pl index 6d5b3b2e03..24e53779d1 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -75,6 +75,10 @@ output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log my $category_type = $patron->category->category_type; +if ( $patron->borrowernumber eq C4::Context->preference("AnonymousPatron") ) { + $template->param( is_anonymous => 1 ); +} + for (qw(gonenoaddress lost borrowernotes is_debarred)) { $patron->$_ and $template->param(flagged => 1) and last; } -- 2.39.5